using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1TrueDBGrid;
using PCSUtils.Utils;
using PCSUtils.Log;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComSale.Order.BO;
using PCSComSale.Order.DS;
using PCSComUtils.PCSExc;
using PCSUtils.Framework.TableFrame;

namespace PCSSale.Order
{
	/// <summary>
	/// Summary description for SODeliverySchedule.
	/// </summary>
	public class SODeliverySchedule : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.Button btnHelp;
		private System.Windows.Forms.Button btnDelete;
		private System.Windows.Forms.Button btnSave;
		private System.Windows.Forms.Button btnSOATP;
		private System.Windows.Forms.Button btnPrint;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private const string THIS = "PCSSale.Order.SODeliverySchedule";
		EnumAction enumAction;
		private SaleOrderInformationVO objSaleOrderInformationVO;


		private DataSet dsDeliverySchedule;

		private const string CONVERT_DATE_TOSTRING = "d";
		private const string CONVERT_TIME_TOSTRING = "t";
		private const string DATE_FORMAT = "dd-MM-yyyy HH:mm"; 
		bool blnIgnoreChange;
		private C1.Win.C1Input.C1NumericEdit lblOrderQuantity;
		private C1.Win.C1Input.C1NumericEdit lblTotalDelivery;

		private DataTable dtbGridLayout;
		private C1.Win.C1TrueDBGrid.C1TrueDBGrid dgrdData;
		private System.Windows.Forms.TextBox txtSONo;
		private System.Windows.Forms.TextBox txtLine;
		private System.Windows.Forms.TextBox txtPartNumber;
		private System.Windows.Forms.TextBox txtModel;
		private System.Windows.Forms.TextBox txtPartName;
		private System.Windows.Forms.TextBox txtUnit;
		private System.Windows.Forms.TextBox txtCCN;

		bool blnAllowEditDateTime;
		private C1.Win.C1Input.C1DateEdit dtmDate;
		bool blnAddNewByF12 = true;

		public SODeliverySchedule()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		//**************************************************************************              
		///    <Description>
		///       This method is the constructor for this form.
		///       It will receive the Sale Order information object
		///       and assign it to the local variable for later using
		///    </Description>
		///    <Inputs>
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		public SODeliverySchedule(object pobjSaleOrder)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			objSaleOrderInformationVO = (SaleOrderInformationVO) pobjSaleOrder;
		}
		

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SODeliverySchedule));
			this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.btnClose = new System.Windows.Forms.Button();
			this.btnHelp = new System.Windows.Forms.Button();
			this.btnDelete = new System.Windows.Forms.Button();
			this.btnSave = new System.Windows.Forms.Button();
			this.btnSOATP = new System.Windows.Forms.Button();
			this.btnPrint = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.lblOrderQuantity = new C1.Win.C1Input.C1NumericEdit();
			this.lblTotalDelivery = new C1.Win.C1Input.C1NumericEdit();
			this.txtSONo = new System.Windows.Forms.TextBox();
			this.txtLine = new System.Windows.Forms.TextBox();
			this.txtPartNumber = new System.Windows.Forms.TextBox();
			this.txtModel = new System.Windows.Forms.TextBox();
			this.txtPartName = new System.Windows.Forms.TextBox();
			this.txtUnit = new System.Windows.Forms.TextBox();
			this.txtCCN = new System.Windows.Forms.TextBox();
			this.dtmDate = new C1.Win.C1Input.C1DateEdit();
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.lblOrderQuantity)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.lblTotalDelivery)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmDate)).BeginInit();
			this.SuspendLayout();
			// 
			// dgrdData
			// 
			this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
			this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
			this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
			this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
			this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
			this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
			this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
			this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
			this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
			this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
			this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
			this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
			this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
			this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
			this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
			this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
			this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
			this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
			this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
			this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
			this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
			this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
			this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
			this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
			this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
			this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
			this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
			this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
			this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
			this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
			this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
			this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
			this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
			this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
			this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
			this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
			this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
			this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
			this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
			this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
			this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
			this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
			this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
			this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
			this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
			this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
			this.dgrdData.Name = "dgrdData";
			this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
			this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
			this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
			this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
			this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
			this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
			this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
			this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
			this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
			this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
			this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
			this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
			this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
			this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
			this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
			this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
			this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
			this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
			this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
			this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
			this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
			this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
			this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
			this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
			this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
			this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
			this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
			this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
			this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
			this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
			this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
			this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
			this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
			this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
			this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
			this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
			this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
			this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
			this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
			this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
			this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
			this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
			this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
			this.dgrdData.TabAction = C1.Win.C1TrueDBGrid.TabActionEnum.ColumnNavigation;
			this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
			this.dgrdData.Text = resources.GetString("dgrdData.Text");
			this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
			this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
			this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
			this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
			this.dgrdData.AfterDelete += new System.EventHandler(this.dgrdData_AfterDelete);
			this.dgrdData.AfterUpdate += new System.EventHandler(this.dgrdData_AfterUpdate);
			this.dgrdData.BeforeColEdit += new C1.Win.C1TrueDBGrid.BeforeColEditEventHandler(this.dgrdData_BeforeColEdit);
			this.dgrdData.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_ButtonClick);
			this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
			this.dgrdData.BeforeInsert += new C1.Win.C1TrueDBGrid.CancelEventHandler(this.dgrdData_BeforeInsert);
			this.dgrdData.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.dgrdData_BeforeColUpdate);
			this.dgrdData.BeforeDelete += new C1.Win.C1TrueDBGrid.CancelEventHandler(this.dgrdData_BeforeDelete);
			this.dgrdData.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgrdData_KeyDown);
			this.dgrdData.OnAddNew += new System.EventHandler(this.dgrdData_OnAddNew);
			this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
			// 
			// label9
			// 
			this.label9.AccessibleDescription = resources.GetString("label9.AccessibleDescription");
			this.label9.AccessibleName = resources.GetString("label9.AccessibleName");
			this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label9.Anchor")));
			this.label9.AutoSize = ((bool)(resources.GetObject("label9.AutoSize")));
			this.label9.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label9.Dock")));
			this.label9.Enabled = ((bool)(resources.GetObject("label9.Enabled")));
			this.label9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label9.Font = ((System.Drawing.Font)(resources.GetObject("label9.Font")));
			this.label9.ForeColor = System.Drawing.Color.Black;
			this.label9.Image = ((System.Drawing.Image)(resources.GetObject("label9.Image")));
			this.label9.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label9.ImageAlign")));
			this.label9.ImageIndex = ((int)(resources.GetObject("label9.ImageIndex")));
			this.label9.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label9.ImeMode")));
			this.label9.Location = ((System.Drawing.Point)(resources.GetObject("label9.Location")));
			this.label9.Name = "label9";
			this.label9.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label9.RightToLeft")));
			this.label9.Size = ((System.Drawing.Size)(resources.GetObject("label9.Size")));
			this.label9.TabIndex = ((int)(resources.GetObject("label9.TabIndex")));
			this.label9.Text = resources.GetString("label9.Text");
			this.label9.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label9.TextAlign")));
			this.label9.Visible = ((bool)(resources.GetObject("label9.Visible")));
			// 
			// label10
			// 
			this.label10.AccessibleDescription = resources.GetString("label10.AccessibleDescription");
			this.label10.AccessibleName = resources.GetString("label10.AccessibleName");
			this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label10.Anchor")));
			this.label10.AutoSize = ((bool)(resources.GetObject("label10.AutoSize")));
			this.label10.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label10.Dock")));
			this.label10.Enabled = ((bool)(resources.GetObject("label10.Enabled")));
			this.label10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label10.Font = ((System.Drawing.Font)(resources.GetObject("label10.Font")));
			this.label10.ForeColor = System.Drawing.Color.Black;
			this.label10.Image = ((System.Drawing.Image)(resources.GetObject("label10.Image")));
			this.label10.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label10.ImageAlign")));
			this.label10.ImageIndex = ((int)(resources.GetObject("label10.ImageIndex")));
			this.label10.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label10.ImeMode")));
			this.label10.Location = ((System.Drawing.Point)(resources.GetObject("label10.Location")));
			this.label10.Name = "label10";
			this.label10.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label10.RightToLeft")));
			this.label10.Size = ((System.Drawing.Size)(resources.GetObject("label10.Size")));
			this.label10.TabIndex = ((int)(resources.GetObject("label10.TabIndex")));
			this.label10.Text = resources.GetString("label10.Text");
			this.label10.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label10.TextAlign")));
			this.label10.Visible = ((bool)(resources.GetObject("label10.Visible")));
			// 
			// label7
			// 
			this.label7.AccessibleDescription = resources.GetString("label7.AccessibleDescription");
			this.label7.AccessibleName = resources.GetString("label7.AccessibleName");
			this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label7.Anchor")));
			this.label7.AutoSize = ((bool)(resources.GetObject("label7.AutoSize")));
			this.label7.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label7.Dock")));
			this.label7.Enabled = ((bool)(resources.GetObject("label7.Enabled")));
			this.label7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label7.Font = ((System.Drawing.Font)(resources.GetObject("label7.Font")));
			this.label7.ForeColor = System.Drawing.Color.Black;
			this.label7.Image = ((System.Drawing.Image)(resources.GetObject("label7.Image")));
			this.label7.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label7.ImageAlign")));
			this.label7.ImageIndex = ((int)(resources.GetObject("label7.ImageIndex")));
			this.label7.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label7.ImeMode")));
			this.label7.Location = ((System.Drawing.Point)(resources.GetObject("label7.Location")));
			this.label7.Name = "label7";
			this.label7.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label7.RightToLeft")));
			this.label7.Size = ((System.Drawing.Size)(resources.GetObject("label7.Size")));
			this.label7.TabIndex = ((int)(resources.GetObject("label7.TabIndex")));
			this.label7.Text = resources.GetString("label7.Text");
			this.label7.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label7.TextAlign")));
			this.label7.Visible = ((bool)(resources.GetObject("label7.Visible")));
			// 
			// label6
			// 
			this.label6.AccessibleDescription = resources.GetString("label6.AccessibleDescription");
			this.label6.AccessibleName = resources.GetString("label6.AccessibleName");
			this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label6.Anchor")));
			this.label6.AutoSize = ((bool)(resources.GetObject("label6.AutoSize")));
			this.label6.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label6.Dock")));
			this.label6.Enabled = ((bool)(resources.GetObject("label6.Enabled")));
			this.label6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label6.Font = ((System.Drawing.Font)(resources.GetObject("label6.Font")));
			this.label6.ForeColor = System.Drawing.Color.Black;
			this.label6.Image = ((System.Drawing.Image)(resources.GetObject("label6.Image")));
			this.label6.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label6.ImageAlign")));
			this.label6.ImageIndex = ((int)(resources.GetObject("label6.ImageIndex")));
			this.label6.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label6.ImeMode")));
			this.label6.Location = ((System.Drawing.Point)(resources.GetObject("label6.Location")));
			this.label6.Name = "label6";
			this.label6.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label6.RightToLeft")));
			this.label6.Size = ((System.Drawing.Size)(resources.GetObject("label6.Size")));
			this.label6.TabIndex = ((int)(resources.GetObject("label6.TabIndex")));
			this.label6.Text = resources.GetString("label6.Text");
			this.label6.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label6.TextAlign")));
			this.label6.Visible = ((bool)(resources.GetObject("label6.Visible")));
			// 
			// label5
			// 
			this.label5.AccessibleDescription = resources.GetString("label5.AccessibleDescription");
			this.label5.AccessibleName = resources.GetString("label5.AccessibleName");
			this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label5.Anchor")));
			this.label5.AutoSize = ((bool)(resources.GetObject("label5.AutoSize")));
			this.label5.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label5.Dock")));
			this.label5.Enabled = ((bool)(resources.GetObject("label5.Enabled")));
			this.label5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label5.Font = ((System.Drawing.Font)(resources.GetObject("label5.Font")));
			this.label5.ForeColor = System.Drawing.Color.Black;
			this.label5.Image = ((System.Drawing.Image)(resources.GetObject("label5.Image")));
			this.label5.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label5.ImageAlign")));
			this.label5.ImageIndex = ((int)(resources.GetObject("label5.ImageIndex")));
			this.label5.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label5.ImeMode")));
			this.label5.Location = ((System.Drawing.Point)(resources.GetObject("label5.Location")));
			this.label5.Name = "label5";
			this.label5.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label5.RightToLeft")));
			this.label5.Size = ((System.Drawing.Size)(resources.GetObject("label5.Size")));
			this.label5.TabIndex = ((int)(resources.GetObject("label5.TabIndex")));
			this.label5.Text = resources.GetString("label5.Text");
			this.label5.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label5.TextAlign")));
			this.label5.Visible = ((bool)(resources.GetObject("label5.Visible")));
			// 
			// label4
			// 
			this.label4.AccessibleDescription = resources.GetString("label4.AccessibleDescription");
			this.label4.AccessibleName = resources.GetString("label4.AccessibleName");
			this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label4.Anchor")));
			this.label4.AutoSize = ((bool)(resources.GetObject("label4.AutoSize")));
			this.label4.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label4.Dock")));
			this.label4.Enabled = ((bool)(resources.GetObject("label4.Enabled")));
			this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label4.Font = ((System.Drawing.Font)(resources.GetObject("label4.Font")));
			this.label4.ForeColor = System.Drawing.Color.Black;
			this.label4.Image = ((System.Drawing.Image)(resources.GetObject("label4.Image")));
			this.label4.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label4.ImageAlign")));
			this.label4.ImageIndex = ((int)(resources.GetObject("label4.ImageIndex")));
			this.label4.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label4.ImeMode")));
			this.label4.Location = ((System.Drawing.Point)(resources.GetObject("label4.Location")));
			this.label4.Name = "label4";
			this.label4.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label4.RightToLeft")));
			this.label4.Size = ((System.Drawing.Size)(resources.GetObject("label4.Size")));
			this.label4.TabIndex = ((int)(resources.GetObject("label4.TabIndex")));
			this.label4.Text = resources.GetString("label4.Text");
			this.label4.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label4.TextAlign")));
			this.label4.Visible = ((bool)(resources.GetObject("label4.Visible")));
			// 
			// label3
			// 
			this.label3.AccessibleDescription = resources.GetString("label3.AccessibleDescription");
			this.label3.AccessibleName = resources.GetString("label3.AccessibleName");
			this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label3.Anchor")));
			this.label3.AutoSize = ((bool)(resources.GetObject("label3.AutoSize")));
			this.label3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label3.Dock")));
			this.label3.Enabled = ((bool)(resources.GetObject("label3.Enabled")));
			this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label3.Font = ((System.Drawing.Font)(resources.GetObject("label3.Font")));
			this.label3.ForeColor = System.Drawing.Color.Black;
			this.label3.Image = ((System.Drawing.Image)(resources.GetObject("label3.Image")));
			this.label3.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.ImageAlign")));
			this.label3.ImageIndex = ((int)(resources.GetObject("label3.ImageIndex")));
			this.label3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label3.ImeMode")));
			this.label3.Location = ((System.Drawing.Point)(resources.GetObject("label3.Location")));
			this.label3.Name = "label3";
			this.label3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label3.RightToLeft")));
			this.label3.Size = ((System.Drawing.Size)(resources.GetObject("label3.Size")));
			this.label3.TabIndex = ((int)(resources.GetObject("label3.TabIndex")));
			this.label3.Text = resources.GetString("label3.Text");
			this.label3.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.TextAlign")));
			this.label3.Visible = ((bool)(resources.GetObject("label3.Visible")));
			// 
			// label2
			// 
			this.label2.AccessibleDescription = resources.GetString("label2.AccessibleDescription");
			this.label2.AccessibleName = resources.GetString("label2.AccessibleName");
			this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label2.Anchor")));
			this.label2.AutoSize = ((bool)(resources.GetObject("label2.AutoSize")));
			this.label2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label2.Dock")));
			this.label2.Enabled = ((bool)(resources.GetObject("label2.Enabled")));
			this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label2.Font = ((System.Drawing.Font)(resources.GetObject("label2.Font")));
			this.label2.ForeColor = System.Drawing.Color.Black;
			this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image")));
			this.label2.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.ImageAlign")));
			this.label2.ImageIndex = ((int)(resources.GetObject("label2.ImageIndex")));
			this.label2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label2.ImeMode")));
			this.label2.Location = ((System.Drawing.Point)(resources.GetObject("label2.Location")));
			this.label2.Name = "label2";
			this.label2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label2.RightToLeft")));
			this.label2.Size = ((System.Drawing.Size)(resources.GetObject("label2.Size")));
			this.label2.TabIndex = ((int)(resources.GetObject("label2.TabIndex")));
			this.label2.Text = resources.GetString("label2.Text");
			this.label2.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.TextAlign")));
			this.label2.Visible = ((bool)(resources.GetObject("label2.Visible")));
			// 
			// btnClose
			// 
			this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
			this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
			this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
			this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
			this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
			this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
			this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
			this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
			this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
			this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
			this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
			this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
			this.btnClose.Name = "btnClose";
			this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
			this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
			this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
			this.btnClose.Text = resources.GetString("btnClose.Text");
			this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
			this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// btnHelp
			// 
			this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
			this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
			this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
			this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
			this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
			this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
			this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
			this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
			this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
			this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
			this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
			this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
			this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
			this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
			this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
			this.btnHelp.Text = resources.GetString("btnHelp.Text");
			this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
			this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
			this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
			// 
			// btnDelete
			// 
			this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
			this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
			this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
			this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
			this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
			this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
			this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
			this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
			this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
			this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
			this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
			this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
			this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
			this.btnDelete.Name = "btnDelete";
			this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
			this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
			this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
			this.btnDelete.Text = resources.GetString("btnDelete.Text");
			this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
			this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
			this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
			// 
			// btnSave
			// 
			this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
			this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
			this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
			this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
			this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
			this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
			this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
			this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
			this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
			this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
			this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
			this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
			this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
			this.btnSave.Name = "btnSave";
			this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
			this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
			this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
			this.btnSave.Text = resources.GetString("btnSave.Text");
			this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
			this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
			this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
			// 
			// btnSOATP
			// 
			this.btnSOATP.AccessibleDescription = resources.GetString("btnSOATP.AccessibleDescription");
			this.btnSOATP.AccessibleName = resources.GetString("btnSOATP.AccessibleName");
			this.btnSOATP.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSOATP.Anchor")));
			this.btnSOATP.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSOATP.BackgroundImage")));
			this.btnSOATP.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSOATP.Dock")));
			this.btnSOATP.Enabled = ((bool)(resources.GetObject("btnSOATP.Enabled")));
			this.btnSOATP.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSOATP.FlatStyle")));
			this.btnSOATP.Font = ((System.Drawing.Font)(resources.GetObject("btnSOATP.Font")));
			this.btnSOATP.Image = ((System.Drawing.Image)(resources.GetObject("btnSOATP.Image")));
			this.btnSOATP.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSOATP.ImageAlign")));
			this.btnSOATP.ImageIndex = ((int)(resources.GetObject("btnSOATP.ImageIndex")));
			this.btnSOATP.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSOATP.ImeMode")));
			this.btnSOATP.Location = ((System.Drawing.Point)(resources.GetObject("btnSOATP.Location")));
			this.btnSOATP.Name = "btnSOATP";
			this.btnSOATP.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSOATP.RightToLeft")));
			this.btnSOATP.Size = ((System.Drawing.Size)(resources.GetObject("btnSOATP.Size")));
			this.btnSOATP.TabIndex = ((int)(resources.GetObject("btnSOATP.TabIndex")));
			this.btnSOATP.Text = resources.GetString("btnSOATP.Text");
			this.btnSOATP.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSOATP.TextAlign")));
			this.btnSOATP.Visible = ((bool)(resources.GetObject("btnSOATP.Visible")));
			this.btnSOATP.Click += new System.EventHandler(this.btnSOATP_Click);
			// 
			// btnPrint
			// 
			this.btnPrint.AccessibleDescription = resources.GetString("btnPrint.AccessibleDescription");
			this.btnPrint.AccessibleName = resources.GetString("btnPrint.AccessibleName");
			this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPrint.Anchor")));
			this.btnPrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPrint.BackgroundImage")));
			this.btnPrint.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPrint.Dock")));
			this.btnPrint.Enabled = ((bool)(resources.GetObject("btnPrint.Enabled")));
			this.btnPrint.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPrint.FlatStyle")));
			this.btnPrint.Font = ((System.Drawing.Font)(resources.GetObject("btnPrint.Font")));
			this.btnPrint.Image = ((System.Drawing.Image)(resources.GetObject("btnPrint.Image")));
			this.btnPrint.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.ImageAlign")));
			this.btnPrint.ImageIndex = ((int)(resources.GetObject("btnPrint.ImageIndex")));
			this.btnPrint.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPrint.ImeMode")));
			this.btnPrint.Location = ((System.Drawing.Point)(resources.GetObject("btnPrint.Location")));
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPrint.RightToLeft")));
			this.btnPrint.Size = ((System.Drawing.Size)(resources.GetObject("btnPrint.Size")));
			this.btnPrint.TabIndex = ((int)(resources.GetObject("btnPrint.TabIndex")));
			this.btnPrint.Text = resources.GetString("btnPrint.Text");
			this.btnPrint.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.TextAlign")));
			this.btnPrint.Visible = ((bool)(resources.GetObject("btnPrint.Visible")));
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// label1
			// 
			this.label1.AccessibleDescription = resources.GetString("label1.AccessibleDescription");
			this.label1.AccessibleName = resources.GetString("label1.AccessibleName");
			this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
			this.label1.AutoSize = ((bool)(resources.GetObject("label1.AutoSize")));
			this.label1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label1.Dock")));
			this.label1.Enabled = ((bool)(resources.GetObject("label1.Enabled")));
			this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label1.Font = ((System.Drawing.Font)(resources.GetObject("label1.Font")));
			this.label1.ForeColor = System.Drawing.Color.Black;
			this.label1.Image = ((System.Drawing.Image)(resources.GetObject("label1.Image")));
			this.label1.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.ImageAlign")));
			this.label1.ImageIndex = ((int)(resources.GetObject("label1.ImageIndex")));
			this.label1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label1.ImeMode")));
			this.label1.Location = ((System.Drawing.Point)(resources.GetObject("label1.Location")));
			this.label1.Name = "label1";
			this.label1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label1.RightToLeft")));
			this.label1.Size = ((System.Drawing.Size)(resources.GetObject("label1.Size")));
			this.label1.TabIndex = ((int)(resources.GetObject("label1.TabIndex")));
			this.label1.Text = resources.GetString("label1.Text");
			this.label1.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.TextAlign")));
			this.label1.Visible = ((bool)(resources.GetObject("label1.Visible")));
			// 
			// lblOrderQuantity
			// 
			this.lblOrderQuantity.AcceptsEscape = ((bool)(resources.GetObject("lblOrderQuantity.AcceptsEscape")));
			this.lblOrderQuantity.AccessibleDescription = resources.GetString("lblOrderQuantity.AccessibleDescription");
			this.lblOrderQuantity.AccessibleName = resources.GetString("lblOrderQuantity.AccessibleName");
			this.lblOrderQuantity.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblOrderQuantity.Anchor")));
			this.lblOrderQuantity.AutoSize = ((bool)(resources.GetObject("lblOrderQuantity.AutoSize")));
			this.lblOrderQuantity.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lblOrderQuantity.BackgroundImage")));
			this.lblOrderQuantity.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("lblOrderQuantity.BorderStyle")));
			// 
			// lblOrderQuantity.Calculator
			// 
			this.lblOrderQuantity.Calculator.AccessibleDescription = resources.GetString("lblOrderQuantity.Calculator.AccessibleDescription");
			this.lblOrderQuantity.Calculator.AccessibleName = resources.GetString("lblOrderQuantity.Calculator.AccessibleName");
			this.lblOrderQuantity.Calculator.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lblOrderQuantity.Calculator.BackgroundImage")));
			this.lblOrderQuantity.Calculator.ButtonFlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("lblOrderQuantity.Calculator.ButtonFlatStyle")));
			this.lblOrderQuantity.Calculator.DisplayFormat = resources.GetString("lblOrderQuantity.Calculator.DisplayFormat");
			this.lblOrderQuantity.Calculator.Font = ((System.Drawing.Font)(resources.GetObject("lblOrderQuantity.Calculator.Font")));
			this.lblOrderQuantity.Calculator.FormatOnClose = ((bool)(resources.GetObject("lblOrderQuantity.Calculator.FormatOnClose")));
			this.lblOrderQuantity.Calculator.StoredFormat = resources.GetString("lblOrderQuantity.Calculator.StoredFormat");
			this.lblOrderQuantity.Calculator.UIStrings.Content = ((string[])(resources.GetObject("lblOrderQuantity.Calculator.UIStrings.Content")));
			this.lblOrderQuantity.CaseSensitive = ((bool)(resources.GetObject("lblOrderQuantity.CaseSensitive")));
			this.lblOrderQuantity.Culture = ((int)(resources.GetObject("lblOrderQuantity.Culture")));
			this.lblOrderQuantity.CustomFormat = resources.GetString("lblOrderQuantity.CustomFormat");
			this.lblOrderQuantity.DataType = ((System.Type)(resources.GetObject("lblOrderQuantity.DataType")));
			this.lblOrderQuantity.DisplayFormat.CustomFormat = resources.GetString("lblOrderQuantity.DisplayFormat.CustomFormat");
			this.lblOrderQuantity.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblOrderQuantity.DisplayFormat.FormatType")));
			this.lblOrderQuantity.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("lblOrderQuantity.DisplayFormat.Inherit")));
			this.lblOrderQuantity.DisplayFormat.NullText = resources.GetString("lblOrderQuantity.DisplayFormat.NullText");
			this.lblOrderQuantity.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("lblOrderQuantity.DisplayFormat.TrimEnd")));
			this.lblOrderQuantity.DisplayFormat.TrimStart = ((bool)(resources.GetObject("lblOrderQuantity.DisplayFormat.TrimStart")));
			this.lblOrderQuantity.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblOrderQuantity.Dock")));
			this.lblOrderQuantity.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("lblOrderQuantity.DropDownFormAlign")));
			this.lblOrderQuantity.EditFormat.CustomFormat = resources.GetString("lblOrderQuantity.EditFormat.CustomFormat");
			this.lblOrderQuantity.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblOrderQuantity.EditFormat.FormatType")));
			this.lblOrderQuantity.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("lblOrderQuantity.EditFormat.Inherit")));
			this.lblOrderQuantity.EditFormat.NullText = resources.GetString("lblOrderQuantity.EditFormat.NullText");
			this.lblOrderQuantity.EditFormat.TrimEnd = ((bool)(resources.GetObject("lblOrderQuantity.EditFormat.TrimEnd")));
			this.lblOrderQuantity.EditFormat.TrimStart = ((bool)(resources.GetObject("lblOrderQuantity.EditFormat.TrimStart")));
			this.lblOrderQuantity.EditMask = resources.GetString("lblOrderQuantity.EditMask");
			this.lblOrderQuantity.EmptyAsNull = ((bool)(resources.GetObject("lblOrderQuantity.EmptyAsNull")));
			this.lblOrderQuantity.Enabled = ((bool)(resources.GetObject("lblOrderQuantity.Enabled")));
			this.lblOrderQuantity.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("lblOrderQuantity.ErrorInfo.BeepOnError")));
			this.lblOrderQuantity.ErrorInfo.ErrorMessage = resources.GetString("lblOrderQuantity.ErrorInfo.ErrorMessage");
			this.lblOrderQuantity.ErrorInfo.ErrorMessageCaption = resources.GetString("lblOrderQuantity.ErrorInfo.ErrorMessageCaption");
			this.lblOrderQuantity.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("lblOrderQuantity.ErrorInfo.ShowErrorMessage")));
			this.lblOrderQuantity.ErrorInfo.ValueOnError = ((object)(resources.GetObject("lblOrderQuantity.ErrorInfo.ValueOnError")));
			this.lblOrderQuantity.Font = ((System.Drawing.Font)(resources.GetObject("lblOrderQuantity.Font")));
			this.lblOrderQuantity.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblOrderQuantity.FormatType")));
			this.lblOrderQuantity.GapHeight = ((int)(resources.GetObject("lblOrderQuantity.GapHeight")));
			this.lblOrderQuantity.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblOrderQuantity.ImeMode")));
			this.lblOrderQuantity.Increment = ((object)(resources.GetObject("lblOrderQuantity.Increment")));
			this.lblOrderQuantity.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("lblOrderQuantity.InitialSelection")));
			this.lblOrderQuantity.Location = ((System.Drawing.Point)(resources.GetObject("lblOrderQuantity.Location")));
			this.lblOrderQuantity.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("lblOrderQuantity.MaskInfo.AutoTabWhenFilled")));
			this.lblOrderQuantity.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("lblOrderQuantity.MaskInfo.CaseSensitive")));
			this.lblOrderQuantity.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("lblOrderQuantity.MaskInfo.CopyWithLiterals")));
			this.lblOrderQuantity.MaskInfo.EditMask = resources.GetString("lblOrderQuantity.MaskInfo.EditMask");
			this.lblOrderQuantity.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("lblOrderQuantity.MaskInfo.EmptyAsNull")));
			this.lblOrderQuantity.MaskInfo.ErrorMessage = resources.GetString("lblOrderQuantity.MaskInfo.ErrorMessage");
			this.lblOrderQuantity.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("lblOrderQuantity.MaskInfo.Inherit")));
			this.lblOrderQuantity.MaskInfo.PromptChar = ((char)(resources.GetObject("lblOrderQuantity.MaskInfo.PromptChar")));
			this.lblOrderQuantity.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("lblOrderQuantity.MaskInfo.ShowLiterals")));
			this.lblOrderQuantity.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("lblOrderQuantity.MaskInfo.StoredEmptyChar")));
			this.lblOrderQuantity.MaxLength = ((int)(resources.GetObject("lblOrderQuantity.MaxLength")));
			this.lblOrderQuantity.Name = "lblOrderQuantity";
			this.lblOrderQuantity.NullText = resources.GetString("lblOrderQuantity.NullText");
			this.lblOrderQuantity.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("lblOrderQuantity.ParseInfo.CaseSensitive")));
			this.lblOrderQuantity.ParseInfo.CustomFormat = resources.GetString("lblOrderQuantity.ParseInfo.CustomFormat");
			this.lblOrderQuantity.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("lblOrderQuantity.ParseInfo.EmptyAsNull")));
			this.lblOrderQuantity.ParseInfo.ErrorMessage = resources.GetString("lblOrderQuantity.ParseInfo.ErrorMessage");
			this.lblOrderQuantity.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblOrderQuantity.ParseInfo.FormatType")));
			this.lblOrderQuantity.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("lblOrderQuantity.ParseInfo.Inherit")));
			this.lblOrderQuantity.ParseInfo.NullText = resources.GetString("lblOrderQuantity.ParseInfo.NullText");
			this.lblOrderQuantity.ParseInfo.NumberStyle = ((C1.Win.C1Input.NumberStyleFlags)(resources.GetObject("lblOrderQuantity.ParseInfo.NumberStyle")));
			this.lblOrderQuantity.ParseInfo.TrimEnd = ((bool)(resources.GetObject("lblOrderQuantity.ParseInfo.TrimEnd")));
			this.lblOrderQuantity.ParseInfo.TrimStart = ((bool)(resources.GetObject("lblOrderQuantity.ParseInfo.TrimStart")));
			this.lblOrderQuantity.PasswordChar = ((char)(resources.GetObject("lblOrderQuantity.PasswordChar")));
			this.lblOrderQuantity.PostValidation.CaseSensitive = ((bool)(resources.GetObject("lblOrderQuantity.PostValidation.CaseSensitive")));
			this.lblOrderQuantity.PostValidation.ErrorMessage = resources.GetString("lblOrderQuantity.PostValidation.ErrorMessage");
			this.lblOrderQuantity.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("lblOrderQuantity.PostValidation.Inherit")));
			this.lblOrderQuantity.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("lblOrderQuantity.PostValidation.Validation")));
			this.lblOrderQuantity.PostValidation.Values = ((System.Array)(resources.GetObject("lblOrderQuantity.PostValidation.Values")));
			this.lblOrderQuantity.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("lblOrderQuantity.PostValidation.ValuesExcluded")));
			this.lblOrderQuantity.PreValidation.CaseSensitive = ((bool)(resources.GetObject("lblOrderQuantity.PreValidation.CaseSensitive")));
			this.lblOrderQuantity.PreValidation.ErrorMessage = resources.GetString("lblOrderQuantity.PreValidation.ErrorMessage");
			this.lblOrderQuantity.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("lblOrderQuantity.PreValidation.Inherit")));
			this.lblOrderQuantity.PreValidation.ItemSeparator = resources.GetString("lblOrderQuantity.PreValidation.ItemSeparator");
			this.lblOrderQuantity.PreValidation.PatternString = resources.GetString("lblOrderQuantity.PreValidation.PatternString");
			this.lblOrderQuantity.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("lblOrderQuantity.PreValidation.RegexOptions")));
			this.lblOrderQuantity.PreValidation.TrimEnd = ((bool)(resources.GetObject("lblOrderQuantity.PreValidation.TrimEnd")));
			this.lblOrderQuantity.PreValidation.TrimStart = ((bool)(resources.GetObject("lblOrderQuantity.PreValidation.TrimStart")));
			this.lblOrderQuantity.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("lblOrderQuantity.PreValidation.Validation")));
			this.lblOrderQuantity.ReadOnly = true;
			this.lblOrderQuantity.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblOrderQuantity.RightToLeft")));
			this.lblOrderQuantity.ShowFocusRectangle = ((bool)(resources.GetObject("lblOrderQuantity.ShowFocusRectangle")));
			this.lblOrderQuantity.Size = ((System.Drawing.Size)(resources.GetObject("lblOrderQuantity.Size")));
			this.lblOrderQuantity.TabIndex = ((int)(resources.GetObject("lblOrderQuantity.TabIndex")));
			this.lblOrderQuantity.TabStop = false;
			this.lblOrderQuantity.Tag = ((object)(resources.GetObject("lblOrderQuantity.Tag")));
			this.lblOrderQuantity.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("lblOrderQuantity.TextAlign")));
			this.lblOrderQuantity.TrimEnd = ((bool)(resources.GetObject("lblOrderQuantity.TrimEnd")));
			this.lblOrderQuantity.TrimStart = ((bool)(resources.GetObject("lblOrderQuantity.TrimStart")));
			this.lblOrderQuantity.UserCultureOverride = ((bool)(resources.GetObject("lblOrderQuantity.UserCultureOverride")));
			this.lblOrderQuantity.Value = ((object)(resources.GetObject("lblOrderQuantity.Value")));
			this.lblOrderQuantity.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("lblOrderQuantity.VerticalAlign")));
			this.lblOrderQuantity.Visible = ((bool)(resources.GetObject("lblOrderQuantity.Visible")));
			this.lblOrderQuantity.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("lblOrderQuantity.VisibleButtons")));
			// 
			// lblTotalDelivery
			// 
			this.lblTotalDelivery.AcceptsEscape = ((bool)(resources.GetObject("lblTotalDelivery.AcceptsEscape")));
			this.lblTotalDelivery.AccessibleDescription = resources.GetString("lblTotalDelivery.AccessibleDescription");
			this.lblTotalDelivery.AccessibleName = resources.GetString("lblTotalDelivery.AccessibleName");
			this.lblTotalDelivery.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblTotalDelivery.Anchor")));
			this.lblTotalDelivery.AutoSize = ((bool)(resources.GetObject("lblTotalDelivery.AutoSize")));
			this.lblTotalDelivery.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lblTotalDelivery.BackgroundImage")));
			this.lblTotalDelivery.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("lblTotalDelivery.BorderStyle")));
			// 
			// lblTotalDelivery.Calculator
			// 
			this.lblTotalDelivery.Calculator.AccessibleDescription = resources.GetString("lblTotalDelivery.Calculator.AccessibleDescription");
			this.lblTotalDelivery.Calculator.AccessibleName = resources.GetString("lblTotalDelivery.Calculator.AccessibleName");
			this.lblTotalDelivery.Calculator.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lblTotalDelivery.Calculator.BackgroundImage")));
			this.lblTotalDelivery.Calculator.ButtonFlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("lblTotalDelivery.Calculator.ButtonFlatStyle")));
			this.lblTotalDelivery.Calculator.DisplayFormat = resources.GetString("lblTotalDelivery.Calculator.DisplayFormat");
			this.lblTotalDelivery.Calculator.Font = ((System.Drawing.Font)(resources.GetObject("lblTotalDelivery.Calculator.Font")));
			this.lblTotalDelivery.Calculator.FormatOnClose = ((bool)(resources.GetObject("lblTotalDelivery.Calculator.FormatOnClose")));
			this.lblTotalDelivery.Calculator.StoredFormat = resources.GetString("lblTotalDelivery.Calculator.StoredFormat");
			this.lblTotalDelivery.Calculator.UIStrings.Content = ((string[])(resources.GetObject("lblTotalDelivery.Calculator.UIStrings.Content")));
			this.lblTotalDelivery.CaseSensitive = ((bool)(resources.GetObject("lblTotalDelivery.CaseSensitive")));
			this.lblTotalDelivery.Culture = ((int)(resources.GetObject("lblTotalDelivery.Culture")));
			this.lblTotalDelivery.CustomFormat = resources.GetString("lblTotalDelivery.CustomFormat");
			this.lblTotalDelivery.DataType = ((System.Type)(resources.GetObject("lblTotalDelivery.DataType")));
			this.lblTotalDelivery.DisplayFormat.CustomFormat = resources.GetString("lblTotalDelivery.DisplayFormat.CustomFormat");
			this.lblTotalDelivery.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblTotalDelivery.DisplayFormat.FormatType")));
			this.lblTotalDelivery.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("lblTotalDelivery.DisplayFormat.Inherit")));
			this.lblTotalDelivery.DisplayFormat.NullText = resources.GetString("lblTotalDelivery.DisplayFormat.NullText");
			this.lblTotalDelivery.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("lblTotalDelivery.DisplayFormat.TrimEnd")));
			this.lblTotalDelivery.DisplayFormat.TrimStart = ((bool)(resources.GetObject("lblTotalDelivery.DisplayFormat.TrimStart")));
			this.lblTotalDelivery.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblTotalDelivery.Dock")));
			this.lblTotalDelivery.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("lblTotalDelivery.DropDownFormAlign")));
			this.lblTotalDelivery.EditFormat.CustomFormat = resources.GetString("lblTotalDelivery.EditFormat.CustomFormat");
			this.lblTotalDelivery.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblTotalDelivery.EditFormat.FormatType")));
			this.lblTotalDelivery.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("lblTotalDelivery.EditFormat.Inherit")));
			this.lblTotalDelivery.EditFormat.NullText = resources.GetString("lblTotalDelivery.EditFormat.NullText");
			this.lblTotalDelivery.EditFormat.TrimEnd = ((bool)(resources.GetObject("lblTotalDelivery.EditFormat.TrimEnd")));
			this.lblTotalDelivery.EditFormat.TrimStart = ((bool)(resources.GetObject("lblTotalDelivery.EditFormat.TrimStart")));
			this.lblTotalDelivery.EditMask = resources.GetString("lblTotalDelivery.EditMask");
			this.lblTotalDelivery.EmptyAsNull = ((bool)(resources.GetObject("lblTotalDelivery.EmptyAsNull")));
			this.lblTotalDelivery.Enabled = ((bool)(resources.GetObject("lblTotalDelivery.Enabled")));
			this.lblTotalDelivery.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("lblTotalDelivery.ErrorInfo.BeepOnError")));
			this.lblTotalDelivery.ErrorInfo.ErrorMessage = resources.GetString("lblTotalDelivery.ErrorInfo.ErrorMessage");
			this.lblTotalDelivery.ErrorInfo.ErrorMessageCaption = resources.GetString("lblTotalDelivery.ErrorInfo.ErrorMessageCaption");
			this.lblTotalDelivery.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("lblTotalDelivery.ErrorInfo.ShowErrorMessage")));
			this.lblTotalDelivery.ErrorInfo.ValueOnError = ((object)(resources.GetObject("lblTotalDelivery.ErrorInfo.ValueOnError")));
			this.lblTotalDelivery.Font = ((System.Drawing.Font)(resources.GetObject("lblTotalDelivery.Font")));
			this.lblTotalDelivery.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblTotalDelivery.FormatType")));
			this.lblTotalDelivery.GapHeight = ((int)(resources.GetObject("lblTotalDelivery.GapHeight")));
			this.lblTotalDelivery.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblTotalDelivery.ImeMode")));
			this.lblTotalDelivery.Increment = ((object)(resources.GetObject("lblTotalDelivery.Increment")));
			this.lblTotalDelivery.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("lblTotalDelivery.InitialSelection")));
			this.lblTotalDelivery.Location = ((System.Drawing.Point)(resources.GetObject("lblTotalDelivery.Location")));
			this.lblTotalDelivery.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("lblTotalDelivery.MaskInfo.AutoTabWhenFilled")));
			this.lblTotalDelivery.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("lblTotalDelivery.MaskInfo.CaseSensitive")));
			this.lblTotalDelivery.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("lblTotalDelivery.MaskInfo.CopyWithLiterals")));
			this.lblTotalDelivery.MaskInfo.EditMask = resources.GetString("lblTotalDelivery.MaskInfo.EditMask");
			this.lblTotalDelivery.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("lblTotalDelivery.MaskInfo.EmptyAsNull")));
			this.lblTotalDelivery.MaskInfo.ErrorMessage = resources.GetString("lblTotalDelivery.MaskInfo.ErrorMessage");
			this.lblTotalDelivery.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("lblTotalDelivery.MaskInfo.Inherit")));
			this.lblTotalDelivery.MaskInfo.PromptChar = ((char)(resources.GetObject("lblTotalDelivery.MaskInfo.PromptChar")));
			this.lblTotalDelivery.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("lblTotalDelivery.MaskInfo.ShowLiterals")));
			this.lblTotalDelivery.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("lblTotalDelivery.MaskInfo.StoredEmptyChar")));
			this.lblTotalDelivery.MaxLength = ((int)(resources.GetObject("lblTotalDelivery.MaxLength")));
			this.lblTotalDelivery.Name = "lblTotalDelivery";
			this.lblTotalDelivery.NullText = resources.GetString("lblTotalDelivery.NullText");
			this.lblTotalDelivery.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("lblTotalDelivery.ParseInfo.CaseSensitive")));
			this.lblTotalDelivery.ParseInfo.CustomFormat = resources.GetString("lblTotalDelivery.ParseInfo.CustomFormat");
			this.lblTotalDelivery.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("lblTotalDelivery.ParseInfo.EmptyAsNull")));
			this.lblTotalDelivery.ParseInfo.ErrorMessage = resources.GetString("lblTotalDelivery.ParseInfo.ErrorMessage");
			this.lblTotalDelivery.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("lblTotalDelivery.ParseInfo.FormatType")));
			this.lblTotalDelivery.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("lblTotalDelivery.ParseInfo.Inherit")));
			this.lblTotalDelivery.ParseInfo.NullText = resources.GetString("lblTotalDelivery.ParseInfo.NullText");
			this.lblTotalDelivery.ParseInfo.NumberStyle = ((C1.Win.C1Input.NumberStyleFlags)(resources.GetObject("lblTotalDelivery.ParseInfo.NumberStyle")));
			this.lblTotalDelivery.ParseInfo.TrimEnd = ((bool)(resources.GetObject("lblTotalDelivery.ParseInfo.TrimEnd")));
			this.lblTotalDelivery.ParseInfo.TrimStart = ((bool)(resources.GetObject("lblTotalDelivery.ParseInfo.TrimStart")));
			this.lblTotalDelivery.PasswordChar = ((char)(resources.GetObject("lblTotalDelivery.PasswordChar")));
			this.lblTotalDelivery.PostValidation.CaseSensitive = ((bool)(resources.GetObject("lblTotalDelivery.PostValidation.CaseSensitive")));
			this.lblTotalDelivery.PostValidation.ErrorMessage = resources.GetString("lblTotalDelivery.PostValidation.ErrorMessage");
			this.lblTotalDelivery.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("lblTotalDelivery.PostValidation.Inherit")));
			this.lblTotalDelivery.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("lblTotalDelivery.PostValidation.Validation")));
			this.lblTotalDelivery.PostValidation.Values = ((System.Array)(resources.GetObject("lblTotalDelivery.PostValidation.Values")));
			this.lblTotalDelivery.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("lblTotalDelivery.PostValidation.ValuesExcluded")));
			this.lblTotalDelivery.PreValidation.CaseSensitive = ((bool)(resources.GetObject("lblTotalDelivery.PreValidation.CaseSensitive")));
			this.lblTotalDelivery.PreValidation.ErrorMessage = resources.GetString("lblTotalDelivery.PreValidation.ErrorMessage");
			this.lblTotalDelivery.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("lblTotalDelivery.PreValidation.Inherit")));
			this.lblTotalDelivery.PreValidation.ItemSeparator = resources.GetString("lblTotalDelivery.PreValidation.ItemSeparator");
			this.lblTotalDelivery.PreValidation.PatternString = resources.GetString("lblTotalDelivery.PreValidation.PatternString");
			this.lblTotalDelivery.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("lblTotalDelivery.PreValidation.RegexOptions")));
			this.lblTotalDelivery.PreValidation.TrimEnd = ((bool)(resources.GetObject("lblTotalDelivery.PreValidation.TrimEnd")));
			this.lblTotalDelivery.PreValidation.TrimStart = ((bool)(resources.GetObject("lblTotalDelivery.PreValidation.TrimStart")));
			this.lblTotalDelivery.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("lblTotalDelivery.PreValidation.Validation")));
			this.lblTotalDelivery.ReadOnly = true;
			this.lblTotalDelivery.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblTotalDelivery.RightToLeft")));
			this.lblTotalDelivery.ShowFocusRectangle = ((bool)(resources.GetObject("lblTotalDelivery.ShowFocusRectangle")));
			this.lblTotalDelivery.Size = ((System.Drawing.Size)(resources.GetObject("lblTotalDelivery.Size")));
			this.lblTotalDelivery.TabIndex = ((int)(resources.GetObject("lblTotalDelivery.TabIndex")));
			this.lblTotalDelivery.TabStop = false;
			this.lblTotalDelivery.Tag = ((object)(resources.GetObject("lblTotalDelivery.Tag")));
			this.lblTotalDelivery.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("lblTotalDelivery.TextAlign")));
			this.lblTotalDelivery.TrimEnd = ((bool)(resources.GetObject("lblTotalDelivery.TrimEnd")));
			this.lblTotalDelivery.TrimStart = ((bool)(resources.GetObject("lblTotalDelivery.TrimStart")));
			this.lblTotalDelivery.UserCultureOverride = ((bool)(resources.GetObject("lblTotalDelivery.UserCultureOverride")));
			this.lblTotalDelivery.Value = ((object)(resources.GetObject("lblTotalDelivery.Value")));
			this.lblTotalDelivery.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("lblTotalDelivery.VerticalAlign")));
			this.lblTotalDelivery.Visible = ((bool)(resources.GetObject("lblTotalDelivery.Visible")));
			this.lblTotalDelivery.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("lblTotalDelivery.VisibleButtons")));
			// 
			// txtSONo
			// 
			this.txtSONo.AccessibleDescription = resources.GetString("txtSONo.AccessibleDescription");
			this.txtSONo.AccessibleName = resources.GetString("txtSONo.AccessibleName");
			this.txtSONo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtSONo.Anchor")));
			this.txtSONo.AutoSize = ((bool)(resources.GetObject("txtSONo.AutoSize")));
			this.txtSONo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtSONo.BackgroundImage")));
			this.txtSONo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtSONo.Dock")));
			this.txtSONo.Enabled = ((bool)(resources.GetObject("txtSONo.Enabled")));
			this.txtSONo.Font = ((System.Drawing.Font)(resources.GetObject("txtSONo.Font")));
			this.txtSONo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtSONo.ImeMode")));
			this.txtSONo.Location = ((System.Drawing.Point)(resources.GetObject("txtSONo.Location")));
			this.txtSONo.MaxLength = ((int)(resources.GetObject("txtSONo.MaxLength")));
			this.txtSONo.Multiline = ((bool)(resources.GetObject("txtSONo.Multiline")));
			this.txtSONo.Name = "txtSONo";
			this.txtSONo.PasswordChar = ((char)(resources.GetObject("txtSONo.PasswordChar")));
			this.txtSONo.ReadOnly = true;
			this.txtSONo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtSONo.RightToLeft")));
			this.txtSONo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtSONo.ScrollBars")));
			this.txtSONo.Size = ((System.Drawing.Size)(resources.GetObject("txtSONo.Size")));
			this.txtSONo.TabIndex = ((int)(resources.GetObject("txtSONo.TabIndex")));
			this.txtSONo.TabStop = false;
			this.txtSONo.Text = resources.GetString("txtSONo.Text");
			this.txtSONo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtSONo.TextAlign")));
			this.txtSONo.Visible = ((bool)(resources.GetObject("txtSONo.Visible")));
			this.txtSONo.WordWrap = ((bool)(resources.GetObject("txtSONo.WordWrap")));
			// 
			// txtLine
			// 
			this.txtLine.AccessibleDescription = resources.GetString("txtLine.AccessibleDescription");
			this.txtLine.AccessibleName = resources.GetString("txtLine.AccessibleName");
			this.txtLine.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtLine.Anchor")));
			this.txtLine.AutoSize = ((bool)(resources.GetObject("txtLine.AutoSize")));
			this.txtLine.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtLine.BackgroundImage")));
			this.txtLine.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtLine.Dock")));
			this.txtLine.Enabled = ((bool)(resources.GetObject("txtLine.Enabled")));
			this.txtLine.Font = ((System.Drawing.Font)(resources.GetObject("txtLine.Font")));
			this.txtLine.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtLine.ImeMode")));
			this.txtLine.Location = ((System.Drawing.Point)(resources.GetObject("txtLine.Location")));
			this.txtLine.MaxLength = ((int)(resources.GetObject("txtLine.MaxLength")));
			this.txtLine.Multiline = ((bool)(resources.GetObject("txtLine.Multiline")));
			this.txtLine.Name = "txtLine";
			this.txtLine.PasswordChar = ((char)(resources.GetObject("txtLine.PasswordChar")));
			this.txtLine.ReadOnly = true;
			this.txtLine.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtLine.RightToLeft")));
			this.txtLine.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtLine.ScrollBars")));
			this.txtLine.Size = ((System.Drawing.Size)(resources.GetObject("txtLine.Size")));
			this.txtLine.TabIndex = ((int)(resources.GetObject("txtLine.TabIndex")));
			this.txtLine.TabStop = false;
			this.txtLine.Text = resources.GetString("txtLine.Text");
			this.txtLine.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtLine.TextAlign")));
			this.txtLine.Visible = ((bool)(resources.GetObject("txtLine.Visible")));
			this.txtLine.WordWrap = ((bool)(resources.GetObject("txtLine.WordWrap")));
			// 
			// txtPartNumber
			// 
			this.txtPartNumber.AccessibleDescription = resources.GetString("txtPartNumber.AccessibleDescription");
			this.txtPartNumber.AccessibleName = resources.GetString("txtPartNumber.AccessibleName");
			this.txtPartNumber.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtPartNumber.Anchor")));
			this.txtPartNumber.AutoSize = ((bool)(resources.GetObject("txtPartNumber.AutoSize")));
			this.txtPartNumber.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtPartNumber.BackgroundImage")));
			this.txtPartNumber.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtPartNumber.Dock")));
			this.txtPartNumber.Enabled = ((bool)(resources.GetObject("txtPartNumber.Enabled")));
			this.txtPartNumber.Font = ((System.Drawing.Font)(resources.GetObject("txtPartNumber.Font")));
			this.txtPartNumber.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtPartNumber.ImeMode")));
			this.txtPartNumber.Location = ((System.Drawing.Point)(resources.GetObject("txtPartNumber.Location")));
			this.txtPartNumber.MaxLength = ((int)(resources.GetObject("txtPartNumber.MaxLength")));
			this.txtPartNumber.Multiline = ((bool)(resources.GetObject("txtPartNumber.Multiline")));
			this.txtPartNumber.Name = "txtPartNumber";
			this.txtPartNumber.PasswordChar = ((char)(resources.GetObject("txtPartNumber.PasswordChar")));
			this.txtPartNumber.ReadOnly = true;
			this.txtPartNumber.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtPartNumber.RightToLeft")));
			this.txtPartNumber.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtPartNumber.ScrollBars")));
			this.txtPartNumber.Size = ((System.Drawing.Size)(resources.GetObject("txtPartNumber.Size")));
			this.txtPartNumber.TabIndex = ((int)(resources.GetObject("txtPartNumber.TabIndex")));
			this.txtPartNumber.TabStop = false;
			this.txtPartNumber.Text = resources.GetString("txtPartNumber.Text");
			this.txtPartNumber.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtPartNumber.TextAlign")));
			this.txtPartNumber.Visible = ((bool)(resources.GetObject("txtPartNumber.Visible")));
			this.txtPartNumber.WordWrap = ((bool)(resources.GetObject("txtPartNumber.WordWrap")));
			// 
			// txtModel
			// 
			this.txtModel.AccessibleDescription = resources.GetString("txtModel.AccessibleDescription");
			this.txtModel.AccessibleName = resources.GetString("txtModel.AccessibleName");
			this.txtModel.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtModel.Anchor")));
			this.txtModel.AutoSize = ((bool)(resources.GetObject("txtModel.AutoSize")));
			this.txtModel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtModel.BackgroundImage")));
			this.txtModel.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtModel.Dock")));
			this.txtModel.Enabled = ((bool)(resources.GetObject("txtModel.Enabled")));
			this.txtModel.Font = ((System.Drawing.Font)(resources.GetObject("txtModel.Font")));
			this.txtModel.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtModel.ImeMode")));
			this.txtModel.Location = ((System.Drawing.Point)(resources.GetObject("txtModel.Location")));
			this.txtModel.MaxLength = ((int)(resources.GetObject("txtModel.MaxLength")));
			this.txtModel.Multiline = ((bool)(resources.GetObject("txtModel.Multiline")));
			this.txtModel.Name = "txtModel";
			this.txtModel.PasswordChar = ((char)(resources.GetObject("txtModel.PasswordChar")));
			this.txtModel.ReadOnly = true;
			this.txtModel.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtModel.RightToLeft")));
			this.txtModel.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtModel.ScrollBars")));
			this.txtModel.Size = ((System.Drawing.Size)(resources.GetObject("txtModel.Size")));
			this.txtModel.TabIndex = ((int)(resources.GetObject("txtModel.TabIndex")));
			this.txtModel.TabStop = false;
			this.txtModel.Text = resources.GetString("txtModel.Text");
			this.txtModel.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtModel.TextAlign")));
			this.txtModel.Visible = ((bool)(resources.GetObject("txtModel.Visible")));
			this.txtModel.WordWrap = ((bool)(resources.GetObject("txtModel.WordWrap")));
			// 
			// txtPartName
			// 
			this.txtPartName.AccessibleDescription = resources.GetString("txtPartName.AccessibleDescription");
			this.txtPartName.AccessibleName = resources.GetString("txtPartName.AccessibleName");
			this.txtPartName.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtPartName.Anchor")));
			this.txtPartName.AutoSize = ((bool)(resources.GetObject("txtPartName.AutoSize")));
			this.txtPartName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtPartName.BackgroundImage")));
			this.txtPartName.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtPartName.Dock")));
			this.txtPartName.Enabled = ((bool)(resources.GetObject("txtPartName.Enabled")));
			this.txtPartName.Font = ((System.Drawing.Font)(resources.GetObject("txtPartName.Font")));
			this.txtPartName.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtPartName.ImeMode")));
			this.txtPartName.Location = ((System.Drawing.Point)(resources.GetObject("txtPartName.Location")));
			this.txtPartName.MaxLength = ((int)(resources.GetObject("txtPartName.MaxLength")));
			this.txtPartName.Multiline = ((bool)(resources.GetObject("txtPartName.Multiline")));
			this.txtPartName.Name = "txtPartName";
			this.txtPartName.PasswordChar = ((char)(resources.GetObject("txtPartName.PasswordChar")));
			this.txtPartName.ReadOnly = true;
			this.txtPartName.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtPartName.RightToLeft")));
			this.txtPartName.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtPartName.ScrollBars")));
			this.txtPartName.Size = ((System.Drawing.Size)(resources.GetObject("txtPartName.Size")));
			this.txtPartName.TabIndex = ((int)(resources.GetObject("txtPartName.TabIndex")));
			this.txtPartName.TabStop = false;
			this.txtPartName.Text = resources.GetString("txtPartName.Text");
			this.txtPartName.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtPartName.TextAlign")));
			this.txtPartName.Visible = ((bool)(resources.GetObject("txtPartName.Visible")));
			this.txtPartName.WordWrap = ((bool)(resources.GetObject("txtPartName.WordWrap")));
			// 
			// txtUnit
			// 
			this.txtUnit.AccessibleDescription = resources.GetString("txtUnit.AccessibleDescription");
			this.txtUnit.AccessibleName = resources.GetString("txtUnit.AccessibleName");
			this.txtUnit.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtUnit.Anchor")));
			this.txtUnit.AutoSize = ((bool)(resources.GetObject("txtUnit.AutoSize")));
			this.txtUnit.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtUnit.BackgroundImage")));
			this.txtUnit.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtUnit.Dock")));
			this.txtUnit.Enabled = ((bool)(resources.GetObject("txtUnit.Enabled")));
			this.txtUnit.Font = ((System.Drawing.Font)(resources.GetObject("txtUnit.Font")));
			this.txtUnit.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtUnit.ImeMode")));
			this.txtUnit.Location = ((System.Drawing.Point)(resources.GetObject("txtUnit.Location")));
			this.txtUnit.MaxLength = ((int)(resources.GetObject("txtUnit.MaxLength")));
			this.txtUnit.Multiline = ((bool)(resources.GetObject("txtUnit.Multiline")));
			this.txtUnit.Name = "txtUnit";
			this.txtUnit.PasswordChar = ((char)(resources.GetObject("txtUnit.PasswordChar")));
			this.txtUnit.ReadOnly = true;
			this.txtUnit.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtUnit.RightToLeft")));
			this.txtUnit.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtUnit.ScrollBars")));
			this.txtUnit.Size = ((System.Drawing.Size)(resources.GetObject("txtUnit.Size")));
			this.txtUnit.TabIndex = ((int)(resources.GetObject("txtUnit.TabIndex")));
			this.txtUnit.TabStop = false;
			this.txtUnit.Text = resources.GetString("txtUnit.Text");
			this.txtUnit.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtUnit.TextAlign")));
			this.txtUnit.Visible = ((bool)(resources.GetObject("txtUnit.Visible")));
			this.txtUnit.WordWrap = ((bool)(resources.GetObject("txtUnit.WordWrap")));
			// 
			// txtCCN
			// 
			this.txtCCN.AccessibleDescription = resources.GetString("txtCCN.AccessibleDescription");
			this.txtCCN.AccessibleName = resources.GetString("txtCCN.AccessibleName");
			this.txtCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtCCN.Anchor")));
			this.txtCCN.AutoSize = ((bool)(resources.GetObject("txtCCN.AutoSize")));
			this.txtCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtCCN.BackgroundImage")));
			this.txtCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtCCN.Dock")));
			this.txtCCN.Enabled = ((bool)(resources.GetObject("txtCCN.Enabled")));
			this.txtCCN.Font = ((System.Drawing.Font)(resources.GetObject("txtCCN.Font")));
			this.txtCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtCCN.ImeMode")));
			this.txtCCN.Location = ((System.Drawing.Point)(resources.GetObject("txtCCN.Location")));
			this.txtCCN.MaxLength = ((int)(resources.GetObject("txtCCN.MaxLength")));
			this.txtCCN.Multiline = ((bool)(resources.GetObject("txtCCN.Multiline")));
			this.txtCCN.Name = "txtCCN";
			this.txtCCN.PasswordChar = ((char)(resources.GetObject("txtCCN.PasswordChar")));
			this.txtCCN.ReadOnly = true;
			this.txtCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtCCN.RightToLeft")));
			this.txtCCN.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtCCN.ScrollBars")));
			this.txtCCN.Size = ((System.Drawing.Size)(resources.GetObject("txtCCN.Size")));
			this.txtCCN.TabIndex = ((int)(resources.GetObject("txtCCN.TabIndex")));
			this.txtCCN.TabStop = false;
			this.txtCCN.Text = resources.GetString("txtCCN.Text");
			this.txtCCN.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtCCN.TextAlign")));
			this.txtCCN.Visible = ((bool)(resources.GetObject("txtCCN.Visible")));
			this.txtCCN.WordWrap = ((bool)(resources.GetObject("txtCCN.WordWrap")));
			// 
			// dtmDate
			// 
			this.dtmDate.AcceptsEscape = ((bool)(resources.GetObject("dtmDate.AcceptsEscape")));
			this.dtmDate.AccessibleDescription = resources.GetString("dtmDate.AccessibleDescription");
			this.dtmDate.AccessibleName = resources.GetString("dtmDate.AccessibleName");
			this.dtmDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmDate.Anchor")));
			this.dtmDate.AutoSize = ((bool)(resources.GetObject("dtmDate.AutoSize")));
			this.dtmDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmDate.BackgroundImage")));
			this.dtmDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmDate.BorderStyle")));
			// 
			// dtmDate.Calendar
			// 
			this.dtmDate.Calendar.AccessibleDescription = resources.GetString("dtmDate.Calendar.AccessibleDescription");
			this.dtmDate.Calendar.AccessibleName = resources.GetString("dtmDate.Calendar.AccessibleName");
			this.dtmDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.AnnuallyBoldedDates")));
			this.dtmDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmDate.Calendar.BackgroundImage")));
			this.dtmDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.BoldedDates")));
			this.dtmDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmDate.Calendar.CalendarDimensions")));
			this.dtmDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmDate.Calendar.Enabled")));
			this.dtmDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmDate.Calendar.FirstDayOfWeek")));
			this.dtmDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmDate.Calendar.Font")));
			this.dtmDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmDate.Calendar.ImeMode")));
			this.dtmDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmDate.Calendar.MonthlyBoldedDates")));
			this.dtmDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmDate.Calendar.RightToLeft")));
			this.dtmDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmDate.Calendar.ShowClearButton")));
			this.dtmDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmDate.Calendar.ShowTodayButton")));
			this.dtmDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmDate.Calendar.ShowWeekNumbers")));
			this.dtmDate.CaseSensitive = ((bool)(resources.GetObject("dtmDate.CaseSensitive")));
			this.dtmDate.Culture = ((int)(resources.GetObject("dtmDate.Culture")));
			this.dtmDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmDate.CurrentTimeZone")));
			this.dtmDate.CustomFormat = resources.GetString("dtmDate.CustomFormat");
			this.dtmDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmDate.DaylightTimeAdjustment")));
			this.dtmDate.DisplayFormat.CustomFormat = resources.GetString("dtmDate.DisplayFormat.CustomFormat");
			this.dtmDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.DisplayFormat.FormatType")));
			this.dtmDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmDate.DisplayFormat.Inherit")));
			this.dtmDate.DisplayFormat.NullText = resources.GetString("dtmDate.DisplayFormat.NullText");
			this.dtmDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmDate.DisplayFormat.TrimEnd")));
			this.dtmDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmDate.DisplayFormat.TrimStart")));
			this.dtmDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmDate.Dock")));
			this.dtmDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmDate.DropDownFormAlign")));
			this.dtmDate.EditFormat.CustomFormat = resources.GetString("dtmDate.EditFormat.CustomFormat");
			this.dtmDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.EditFormat.FormatType")));
			this.dtmDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmDate.EditFormat.Inherit")));
			this.dtmDate.EditFormat.NullText = resources.GetString("dtmDate.EditFormat.NullText");
			this.dtmDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmDate.EditFormat.TrimEnd")));
			this.dtmDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmDate.EditFormat.TrimStart")));
			this.dtmDate.EditMask = resources.GetString("dtmDate.EditMask");
			this.dtmDate.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.EmptyAsNull")));
			this.dtmDate.Enabled = ((bool)(resources.GetObject("dtmDate.Enabled")));
			this.dtmDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmDate.ErrorInfo.BeepOnError")));
			this.dtmDate.ErrorInfo.ErrorMessage = resources.GetString("dtmDate.ErrorInfo.ErrorMessage");
			this.dtmDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmDate.ErrorInfo.ErrorMessageCaption");
			this.dtmDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmDate.ErrorInfo.ShowErrorMessage")));
			this.dtmDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmDate.ErrorInfo.ValueOnError")));
			this.dtmDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmDate.Font")));
			this.dtmDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.FormatType")));
			this.dtmDate.GapHeight = ((int)(resources.GetObject("dtmDate.GapHeight")));
			this.dtmDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmDate.GMTOffset")));
			this.dtmDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmDate.ImeMode")));
			this.dtmDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmDate.InitialSelection")));
			this.dtmDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmDate.Location")));
			this.dtmDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmDate.MaskInfo.AutoTabWhenFilled")));
			this.dtmDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmDate.MaskInfo.CaseSensitive")));
			this.dtmDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmDate.MaskInfo.CopyWithLiterals")));
			this.dtmDate.MaskInfo.EditMask = resources.GetString("dtmDate.MaskInfo.EditMask");
			this.dtmDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.MaskInfo.EmptyAsNull")));
			this.dtmDate.MaskInfo.ErrorMessage = resources.GetString("dtmDate.MaskInfo.ErrorMessage");
			this.dtmDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmDate.MaskInfo.Inherit")));
			this.dtmDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmDate.MaskInfo.PromptChar")));
			this.dtmDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmDate.MaskInfo.ShowLiterals")));
			this.dtmDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmDate.MaskInfo.StoredEmptyChar")));
			this.dtmDate.MaxLength = ((int)(resources.GetObject("dtmDate.MaxLength")));
			this.dtmDate.Name = "dtmDate";
			this.dtmDate.NullText = resources.GetString("dtmDate.NullText");
			this.dtmDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmDate.ParseInfo.CaseSensitive")));
			this.dtmDate.ParseInfo.CustomFormat = resources.GetString("dtmDate.ParseInfo.CustomFormat");
			this.dtmDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmDate.ParseInfo.DateTimeStyle")));
			this.dtmDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmDate.ParseInfo.EmptyAsNull")));
			this.dtmDate.ParseInfo.ErrorMessage = resources.GetString("dtmDate.ParseInfo.ErrorMessage");
			this.dtmDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmDate.ParseInfo.FormatType")));
			this.dtmDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmDate.ParseInfo.Inherit")));
			this.dtmDate.ParseInfo.NullText = resources.GetString("dtmDate.ParseInfo.NullText");
			this.dtmDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmDate.ParseInfo.TrimEnd")));
			this.dtmDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmDate.ParseInfo.TrimStart")));
			this.dtmDate.PasswordChar = ((char)(resources.GetObject("dtmDate.PasswordChar")));
			this.dtmDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmDate.PostValidation.CaseSensitive")));
			this.dtmDate.PostValidation.ErrorMessage = resources.GetString("dtmDate.PostValidation.ErrorMessage");
			this.dtmDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmDate.PostValidation.Inherit")));
			this.dtmDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmDate.PostValidation.Validation")));
			this.dtmDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmDate.PostValidation.Values")));
			this.dtmDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmDate.PostValidation.ValuesExcluded")));
			this.dtmDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmDate.PreValidation.CaseSensitive")));
			this.dtmDate.PreValidation.ErrorMessage = resources.GetString("dtmDate.PreValidation.ErrorMessage");
			this.dtmDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmDate.PreValidation.Inherit")));
			this.dtmDate.PreValidation.ItemSeparator = resources.GetString("dtmDate.PreValidation.ItemSeparator");
			this.dtmDate.PreValidation.PatternString = resources.GetString("dtmDate.PreValidation.PatternString");
			this.dtmDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmDate.PreValidation.RegexOptions")));
			this.dtmDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmDate.PreValidation.TrimEnd")));
			this.dtmDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmDate.PreValidation.TrimStart")));
			this.dtmDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmDate.PreValidation.Validation")));
			this.dtmDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmDate.RightToLeft")));
			this.dtmDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmDate.ShowFocusRectangle")));
			this.dtmDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmDate.Size")));
			this.dtmDate.TabIndex = ((int)(resources.GetObject("dtmDate.TabIndex")));
			this.dtmDate.Tag = ((object)(resources.GetObject("dtmDate.Tag")));
			this.dtmDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmDate.TextAlign")));
			this.dtmDate.TrimEnd = ((bool)(resources.GetObject("dtmDate.TrimEnd")));
			this.dtmDate.TrimStart = ((bool)(resources.GetObject("dtmDate.TrimStart")));
			this.dtmDate.UserCultureOverride = ((bool)(resources.GetObject("dtmDate.UserCultureOverride")));
			this.dtmDate.Value = ((object)(resources.GetObject("dtmDate.Value")));
			this.dtmDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmDate.VerticalAlign")));
			this.dtmDate.Visible = ((bool)(resources.GetObject("dtmDate.Visible")));
			this.dtmDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmDate.VisibleButtons")));
			this.dtmDate.DropDownClosed += new DropDownClosedEventHandler(this.dtmDate_DropDownClosed);
			// 
			// SODeliverySchedule
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.CancelButton = this.btnClose;
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Controls.Add(this.txtCCN);
			this.Controls.Add(this.txtUnit);
			this.Controls.Add(this.txtPartName);
			this.Controls.Add(this.txtModel);
			this.Controls.Add(this.txtPartNumber);
			this.Controls.Add(this.txtLine);
			this.Controls.Add(this.txtSONo);
			this.Controls.Add(this.dgrdData);
			this.Controls.Add(this.lblTotalDelivery);
			this.Controls.Add(this.lblOrderQuantity);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label9);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.label7);
			this.Controls.Add(this.btnSOATP);
			this.Controls.Add(this.btnPrint);
			this.Controls.Add(this.btnSave);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnDelete);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.dtmDate);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.KeyPreview = true;
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "SODeliverySchedule";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SODeliverySchedule_KeyDown);
			this.Closing += new System.ComponentModel.CancelEventHandler(this.SODeliverySchedule_Closing);
			this.Load += new System.EventHandler(this.SODeliverySchedule_Load);
			((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.lblOrderQuantity)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.lblTotalDelivery)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.dtmDate)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion
		//**************************************************************************              
		///    <Description>
		///       Load the Data into Grid (list of Sale Order Delivery )
		///       After loading, this method also set some properties for the grid
		///       such as centering heading, invisible several columns, ect ..
		///    </Description>
		///    <Inputs>
		///        Sale Order Detail ID
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void LoadDeliverySchedule(int intSaleOrderLineID) 
		{

			SODeliveryScheduleBO objSODeliveryScheduleBO = new SODeliveryScheduleBO();
			dsDeliverySchedule = objSODeliveryScheduleBO.GetDeliverySchedule(intSaleOrderLineID);
			dgrdData.DataSource = dsDeliverySchedule.Tables[0];
			FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
			dgrdData.AllowUpdate = true;
			if (dsDeliverySchedule.Tables[0].Rows.Count != 0)
			{
				foreach (C1DisplayColumn dcol in dgrdData.Splits[0].DisplayColumns)
				{
					dcol.Locked = true;
				}
			}
			
			//Set the read only for the LINE Column and Delivery No
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.LINE_FLD].Locked = true;
			dgrdData.Splits[0].DisplayColumns["SUMCommitQuantity"].Locked = true;

			//Align center for date
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.REQUIREDDATE_FLD].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.PROMISEDATE_FLD].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Center;

			//align right for Line, Delivery Quantity, Delivery No
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.LINE_FLD].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Far;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Far;
			dgrdData.Splits[0].DisplayColumns["SUMCommitQuantity"].Style.HorizontalAlignment = C1.Win.C1TrueDBGrid.AlignHorzEnum.Far;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].HeadingStyle.ForeColor = Color.Maroon;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].HeadingStyle.ForeColor = Color.Maroon;
			//add button
			dgrdData.Splits[0].DisplayColumns[SO_GateTable.CODE_FLD].Button = true;
			dgrdData.Columns["SUMCommitQuantity"].NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
			dgrdData.Columns[SO_DeliveryScheduleTable.REQUIREDDATE_FLD].NumberFormat = Constants.DATETIME_FORMAT_HOUR;
			dgrdData.Columns[SO_DeliveryScheduleTable.PROMISEDATE_FLD].NumberFormat = Constants.DATETIME_FORMAT_HOUR;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].DataColumn.Editor = dtmDate;
			dgrdData.Columns[SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].NumberFormat = Constants.DATETIME_FORMAT_HOUR;
			//Unlock some columns 
			dgrdData.Splits[0].DisplayColumns[SO_GateTable.CODE_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].Locked = false;
			dgrdData.Splits[0].DisplayColumns[SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].Locked = false;
			//Set the Delivery Quantity
			dgrdData.Columns[SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].NumberFormat = Constants.DECIMAL_NUMBERFORMAT;
			
			//Count the total of Delivery Quantity
			lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();
		}


		//**************************************************************************              
		///    <Description>
		///       This method is used to calculate the total Delivery Quantity
		
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private double SumTotalDeliveryQuantity ()
		{
			const string METHOD_NAME = THIS + ".SumTotalDeliveryQuantity()";
			try 
			{
				int intGridRows = this.dgrdData.RowCount;
			
				// now compute the number of unique values for the country and city columns
				double dblTotalValue = 0 ;
				for(int i = 0; i < intGridRows; i++)
				{
					try 
					{
						dblTotalValue += double.Parse(this.dgrdData[i,SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].ToString());
					}
					catch
					{
						dblTotalValue += 0;
					}
				}
				return dblTotalValue;
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
				return 0;
			}

		}


		//**************************************************************************              
		///    <Description>
		///       This method is used to calculate the total Delivery Quantity
		
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************
		private int GetTheNextLineNumber ()
		{
            int intGridRows = GetRowsCount();

            if (intGridRows == 0)
            {
                return 1;
            }
            int intMax = 0;
            for (int i = 0; i < intGridRows; i++)
            {

                int intTmp;
                try
                {
                    intTmp = int.Parse(this.dgrdData[i, SO_DeliveryScheduleTable.LINE_FLD].ToString());
                }
                catch
                {
                    intTmp = 0;
                }
                if (intMax < intTmp)
                {
                    intMax = intTmp;
                }
            }
            return intMax + 1;

		}


		//**************************************************************************              
		///    <Description>
		///       This method is used to check all the Delivery Schedule before deleting 
		
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private bool IsDeleteAllSchedule()
		{
			//const string METHOD_NAME = THIS + ".CheckBeforeDeleteAllSchedule()";
//			try 
//			{
				int intGridRows = this.dgrdData.RowCount;
			
				for(int i = 0; i < intGridRows; i++)
				{
					string strCommit = dgrdData[i,"SUMCommitQuantity"].ToString().Trim();
					if (strCommit != String.Empty) 
					{
						try
						{
							if (int.Parse(strCommit)>0)
							{
								return false;
							}
						}
						catch{}
					}
				}
				return true;
//			}
//			catch (Exception ex)
//			{
//				throw ex;
//			}

		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to display some brief information 
		///       For the Sale Order detail line 
		///       Such As: product, revision, ccn, ect../
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void DisplaySaleOrderInformation() 
		{
			txtSONo.Text = objSaleOrderInformationVO.SaleOrderNo;
			txtLine.Text = objSaleOrderInformationVO.SaleOrderLine.ToString();
			txtPartNumber.Text = objSaleOrderInformationVO.ProductCode;
			txtModel.Text = objSaleOrderInformationVO.ProductRevision;
			txtPartName.Text = objSaleOrderInformationVO.ProductDescription;
			txtUnit.Text = objSaleOrderInformationVO.UnitCode;
			txtCCN.Text = objSaleOrderInformationVO.CCNCode;
			lblOrderQuantity.Value = objSaleOrderInformationVO.OrderQuantity.ToString();
		}

		//**************************************************************************              
		///    <Description>
		///       Load data for this form .
		///			- Set Security
		///			- Display sale order information
		///			- Load Delivery Schedule detail into grid
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************
		private void SODeliverySchedule_Load(object sender, System.EventArgs e)
		{
			if (objSaleOrderInformationVO == null || objSaleOrderInformationVO.SaleOrderDetailID <=0) 
			{
				this.Close();
				return;
			}
			
			//set the minimum date
			//dtDateTimePicker.MinDate = objSaleOrderInformationVO.OrderDate;
			blnAllowEditDateTime = true;
			const string METHOD_NAME = THIS + ".SODeliverySchedule_Load()";
			try 
			{
				
				//Set authorization for user
				Security objSecurity = new Security();
				this.Name = THIS;
				
				if(objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
				{
					// You don't have the right to view this item
					PCSMessageBox.Show(ErrorCode.MESSAGE_YOU_HAVE_NO_RIGHT_TO_VIEW,MessageBoxIcon.Warning);
					this.Close();
					return;
				}
				
				//added by duongna
				dtbGridLayout = FormControlComponents.StoreGridLayout(dgrdData);
				dtmDate.CustomFormat = Constants.DATETIME_FORMAT_HOUR;
				lblOrderQuantity.CustomFormat = Constants.DECIMAL_NUMBERFORMAT;
				lblTotalDelivery.CustomFormat = Constants.DECIMAL_NUMBERFORMAT;

				enumAction = new EnumAction();
				enumAction = EnumAction.Default;
				
				//Display Sale Order Information
				DisplaySaleOrderInformation();

				//Load the Delivery Detail data
				LoadDeliverySchedule(objSaleOrderInformationVO.SaleOrderDetailID);

				//Diable or Enable buttons
				//EnableDisableButtons();

				FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
				
			}
			catch (PCSException ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		
		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to save data into database
		///			- First : Check if there is any row
		///			- Second : Check the total delivery quantity
		///			- Thrid : Select some date : Require, promise, and Schedule datetime
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private bool SaveToDatabase() 
		{
			const string METHOD_NAME = THIS + ".SaveToDatabase()";
			try 
			{
				int intRowsCount = GetRowsCount();
				for (int i =0; i < intRowsCount; i++)
				{
					if (dgrdData[i, SO_DeliveryScheduleTable.SCHEDULEDATE_FLD].ToString() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PO_DeliveryScheduleTable.SCHEDULEDATE_FLD]);
						dgrdData.Focus();
						return false;
					}
					if (dgrdData[i, SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD].ToString() == string.Empty)
					{
						PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Warning);
						dgrdData.Row = i;
						dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD]);
						dgrdData.Focus();
						return false;
					}
				}

				//Check the business 
				double dblTotalDeliveryQuantity = SumTotalDeliveryQuantity();
				lblTotalDelivery.Value = dblTotalDeliveryQuantity.ToString();
				if (dblTotalDeliveryQuantity > double.Parse(lblOrderQuantity.Text))
				{
					//Display message here
					//MessageBox.Show("The total delivery Quantity must be less than or equal to Order Quantity");
					PCSMessageBox.Show(ErrorCode.MESSAGE_OVER_DELIVERYQTY,MessageBoxIcon.Error);
					return false;
				}

				//Check promise date, schedule date, and require date
				SODeliveryScheduleBO objSODeliveryScheduleBO = new SODeliveryScheduleBO();
				FormControlComponents.SynchronyGridData(dgrdData);
				//objSODeliveryScheduleBO.UpdateDeliveryDataSet(dsDeliverySchedule, objSaleOrderInformationVO.SaleOrderDetailID);
                objSODeliveryScheduleBO.Update(dsDeliverySchedule, objSaleOrderInformationVO.SaleOrderDetailID);
                enumAction = EnumAction.Default;
				dgrdData.Refresh();
				LoadDeliverySchedule(objSaleOrderInformationVO.SaleOrderDetailID);

				//re calculate the total Delivery quantity
				lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();

				return true;
			}			
			catch (PCSException ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
				return false;
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
				return false;
			}

			
		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to close form.
		///       Before closing form, it will check the status on form
		///       if it is Edit mode, this method will display an warning message to ask user for selecting
		///       appropriate action
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void SODeliverySchedule_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			dgrdData.UpdateData();
			if (enumAction == EnumAction.Add || enumAction == EnumAction.Edit)
			{
				System.Windows.Forms.DialogResult dlgResult = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
				switch (dlgResult)
				{
					case DialogResult.Yes:
						if (!SaveToDatabase())
						{
							e.Cancel = true;
						}
						break;
					case DialogResult.No:
						e.Cancel = false;
						break;
					case DialogResult.Cancel:
						e.Cancel = true;
						break;
				}
			}
		
		}
		//**************************************************************************              
		///    <Description>
		///       Save button click
		///        - Call the SaveDatabase method to save data into database
		///        
		///    </Description>
		///    <Inputs>
		///        
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************
		private void btnSave_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnSave_Click()";
			try 
			{
				if (dgrdData.EditActive) return;
				if (SaveToDatabase())
				{
					enumAction = EnumAction.Default;
					PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA, MessageBoxIcon.Information);
				}
			}
			catch (PCSDBException ex) 
			{
				// displays the error message.
				PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// displays the error message.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR,MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
				}
			}
		}

		//**************************************************************************              
		///    <Description>
		///       Before deleting this method is used to check if user is allowed to delete 
		///       it or not
		///    </Description>
		///    <Inputs>
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************
		private bool CheckBeforeDelete()
		{
//			try 
//			{
				if (dgrdData[dgrdData.Row, SO_CommitInventoryDetailTable.COMMITINVENTORYDETAILID_FLD].ToString().Trim() != String.Empty)
				{
					PCSMessageBox.Show(ErrorCode.MESSAGE_CANNOT_DELDELIVERY,MessageBoxIcon.Error);
					return false;
				}
				else
				{
					return true;
				}
//			}
//			catch (Exception ex)
//			{
//				throw ex;
//			}
		}
		
		/// <summary>
		/// Check deleting in case selecting multiplies rows
		/// </summary>
		/// <returns></returns>
		private bool CheckBeforeDeleteAllRows()
		{
//			try 
//			{
				for (int i =0; i <dgrdData.SelectedRows.Count; i++)
				{
					if (dgrdData[int.Parse(dgrdData.SelectedRows[i].ToString()), SO_CommitInventoryDetailTable.COMMITINVENTORYDETAILID_FLD].ToString().Trim() != String.Empty)
					{
						return false;
					}
				}

				return true;
//			}
//			catch (Exception ex)
//			{
//				throw ex;
//			}
		}


		//**************************************************************************              
		///    <Description>
		///       Delete button click
		///    </Description>
		///    <Inputs>
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void btnDelete_Click(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".btnDelete_Click()";
			DialogResult result;
			if (dgrdData.EditActive) return;
			result = PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
			if (result == DialogResult.Yes)
			{
				try
				{
					if (!IsDeleteAllSchedule()) 
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_CANNOT_DELDELIVERY,MessageBoxIcon.Error);
						return;
					}
					SODeliveryScheduleBO objSODeliveryScheduleBO = new SODeliveryScheduleBO();
					objSODeliveryScheduleBO.DeleteDeliveryDetail(objSaleOrderInformationVO.SaleOrderDetailID);
                    //objSODeliveryScheduleBO.Delete(objSaleOrderInformationVO.SaleOrderDetailID);
					LoadDeliverySchedule(objSaleOrderInformationVO.SaleOrderDetailID);
					enumAction = EnumAction.Default;
					//lblTotalDelivery.Text = SumTotalDeliveryQuantity().ToString();
				}			
				catch (PCSDBException ex) 
				{
					// displays the error message.
					PCSMessageBox.Show(ex.mCode,MessageBoxIcon.Error);
					// log message.
					try
					{
						Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
					}
					catch
					{
						PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION,MessageBoxIcon.Error);
					}
				}

				catch (Exception ex)
				{
					PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
					// log message.
					try
					{
						Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
					}
					catch
					{
						PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
					}
				}

			}
		
		}

		private void btnPrint_Click(object sender, System.EventArgs e)
		{
			PCSMessageBox.Show(ErrorCode.NOT_IMPLEMENT);
		}

		private void btnSOATP_Click(object sender, System.EventArgs e)
		{
			PCSMessageBox.Show(ErrorCode.NOT_IMPLEMENT);
		}

		private void btnClose_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void btnHelp_Click(object sender, System.EventArgs e)
		{
		
		}

		//**************************************************************************              
		///    <Description>
		///       Before Delete action on the true db grid
		///       Check if user is allowed to delete or not
		///    </Description>
		///    <Inputs>
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_BeforeDelete(object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeDelete()";
			try
			{
				if (!CheckBeforeDeleteAllRows())
				{
					e.Cancel = true;
					return;
				}
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		//**************************************************************************              
		///    <Description>
		///       Before Column update event on the true dbgrid
		///			- This method will be used to check
		///			Delivery Quantity
		///			and Promise, Schedule, required date
		///    </Description>
		///    <Inputs>
		///        Sale Order Detail ID
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_BeforeColUpdate(object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)
		{
			const string ROW = "row";
			const string METHOD_NAME = THIS + ".dgrdData_BeforeColEdit()";
			try 
			{
				//gate column
				if (e.Column.DataColumn.DataField == SO_GateTable.CODE_FLD)
				{
					DataRowView drwResult = null;
					if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
					{
						drwResult = FormControlComponents.OpenSearchForm(SO_GateTable.TABLE_NAME, SO_GateTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), null, false);
						if (drwResult != null)
						{
							e.Column.DataColumn.Tag = drwResult.Row;	
						}
						else
						{
							e.Cancel = true;
						}
					}
				}
				//first check the Delivery Quantity 
				string strValue = String.Empty;
				if (e.Column.DataColumn.DataField == SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD)
				{
					//Delivery Quantity must be higher 0
					double dblDeliveryQuantity = 0;
					if (e.Column.DataColumn.Value.ToString().Trim() == String.Empty)
					{
						dblDeliveryQuantity = 0 ;
					}
					else
					{
						try
						{
							dblDeliveryQuantity = double.Parse(e.Column.DataColumn.Value.ToString());
						}
						catch
						{
							dblDeliveryQuantity = 0;
						}
					}
					
					double dblOldValue ;
					if (e.OldValue.ToString().Trim() != String.Empty)
					{
						dblOldValue = double.Parse(e.OldValue.ToString());
					}
					else
					{
						dblOldValue = 0;
					}

					double dblRemainingQty = double.Parse(lblOrderQuantity.Text) + dblOldValue - double.Parse(lblTotalDelivery.Text);
					if ((dblDeliveryQuantity == 0) && (e.Column.DataColumn.Value.ToString().Trim() == String.Empty))
					{
						return;
					}
					if (!(dblDeliveryQuantity > 0 && dblDeliveryQuantity <= dblRemainingQty))
					{
						//MessageBox.Show("The Delivery Quantity must be higher than 0");
						PCSMessageBox.Show(ErrorCode.MESSAGE_MIN_DELIVERYQTY,MessageBoxIcon.Warning);
						e.Cancel = true;
						return;
					}
				}
				else
				{
					if (e.Column.DataColumn.DataField == SO_DeliveryScheduleTable.SCHEDULEDATE_FLD)
					{
						if (dtmDate.Value.ToString() == string.Empty) return;
						DateTime dtOrderDate = new DateTime(objSaleOrderInformationVO.OrderDate.Year, objSaleOrderInformationVO.OrderDate.Month,objSaleOrderInformationVO.OrderDate.Day);
						if ((DateTime) dtmDate.Value < dtOrderDate)
						{
							PCSMessageBox.Show(ErrorCode.MESSAGE_CHECK_ORDERDATE, MessageBoxIcon.Error);
							e.Cancel = true;
						}
					}
				}
			}			
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}

		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to check if user is allowed to 
		///       Edit the current data or not
		///    </Description>
		///    <Inputs>
		///        Sale Order Detail ID
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_BeforeColEdit(object sender, C1.Win.C1TrueDBGrid.BeforeColEditEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeColEdit()";
			try
			{
				if (e.Column.DataColumn.DataField == SO_GateTable.CODE_FLD)
				{
					if (dgrdData.Row == dgrdData.RowCount - 1)
					{
						if (lblTotalDelivery.Text.Trim() == lblOrderQuantity.Text.Trim()
							|| (decimal.Parse(lblOrderQuantity.Text) - decimal.Parse(lblTotalDelivery.Text) <=0))
						{
							//MessageBox.Show("There are enought order quantity, you cannot add more row");
							PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
							dtmDate.TextDetached = true;
							e.Cancel = true;
							return;
						}
						if (lblOrderQuantity.Text.Trim() == lblTotalDelivery.Text.Trim()) 
						{
							//MessageBox.Show("There are no enough quantiy for new order delivery ");
							PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
							dtmDate.TextDetached = true;
							e.Cancel = true;
						}
					}
				}
				string strCommit = dgrdData[dgrdData.Row,SO_CommitInventoryDetailTable.COMMITINVENTORYDETAILID_FLD].ToString().Trim();

				if (strCommit == String.Empty || int.Parse(strCommit) == 0)
				{
					e.Cancel = false;
					return;
				}
//				else
//				{
//					e.Cancel = true;
//				}
			}			
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}

		}

		//**************************************************************************              
		///    <Description>
		///       When adding a new row, there are some column will recive default value
		///       This method is used to update the default column
		///    </Description>
		///    <Inputs>
		///        Sale Order Detail ID
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_OnAddNew(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_OnAddNew()";
			try
			{
				CurrencyManager cm;

				//dgrdData.Refresh();
				dgrdData.MoveLast();
				//dgrdData.Row = dgrdData.Row + 1;

				cm = (CurrencyManager) dgrdData.BindingContext[dgrdData.DataSource];
				cm.EndCurrentEdit();
				cm.AddNew();
				dtmDate.TextDetached = false;
				AssignDefaultValue();
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		//**************************************************************************              
		///    <Description>
		///       When adding a new row, there are some column will recive default value
		///       This method is used to update the default column
		///    </Description>
		///    <Inputs>
		///        Sale Order Detail ID
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************
		private void AssignDefaultValue()
		{
			const string METHOD_NAME = THIS + ".AssignDefaultValue()";
			try 
			{
				dgrdData[dgrdData.Row,SO_DeliveryScheduleTable.LINE_FLD] = GetRowsCount() + 1;
				dgrdData[dgrdData.Row,SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD] = decimal.Parse(lblOrderQuantity.Text) - decimal.Parse(lblTotalDelivery.Text);
				dgrdData[dgrdData.Row,SO_DeliveryScheduleTable.REQUIREDDATE_FLD] = objSaleOrderInformationVO.OrderDate.ToString(CONVERT_DATE_TOSTRING);
				dgrdData[dgrdData.Row,SO_DeliveryScheduleTable.SCHEDULEDATE_FLD] = objSaleOrderInformationVO.OrderDate.ToString(CONVERT_DATE_TOSTRING);
				dgrdData[dgrdData.Row,SO_DeliveryScheduleTable.SALEORDERDETAILID_FLD] = objSaleOrderInformationVO.SaleOrderDetailID;
				lblTotalDelivery.Value = objSaleOrderInformationVO.OrderQuantity.ToString();
				enumAction = EnumAction.Edit;
			}			
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}

		}
		//**************************************************************************              
		///    <Description>
		///       After the column is updated, a edit flag is raised to know that 
		///       This data is edit and must be saved before closing
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
			try
			{
				DataRow drwResult = (DataRow) e.Column.DataColumn.Tag;
				//Fill Data to ComNumber
				if (e.Column.DataColumn.DataField == SO_GateTable.CODE_FLD)
				{
					if ((e.Column.DataColumn.Tag == null) ||(dgrdData[dgrdData.Row, SO_GateTable.CODE_FLD].ToString() == string.Empty))
					{
						dgrdData.Columns[SO_GateTable.CODE_FLD].Value = string.Empty;
						dgrdData.Columns[SO_GateTable.GATEID_FLD].Value = null;
					}
					else
					{
						dgrdData.EditActive = true;
						FillItemDataToGrid(drwResult);
						
					}
				}
				if (e.Column.DataColumn.DataField == SO_DeliveryScheduleTable.DELIVERYQUANTITY_FLD) 
				{
					//Re calculate the total delivery quantity
					lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();
				}
				enumAction = EnumAction.Edit;
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to calculate the total Delivery Quantity
		
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void ChangeLineNumber ()
		{
//			try 
//			{
				int intGridRows = GetRowsCount();
				for(int i = 0; i < intGridRows; i++)
				{
					dgrdData[i,SO_DeliveryScheduleTable.LINE_FLD] = i + 1;

				}
				dgrdData.Refresh();
//			}
//			catch (Exception ex)
//			{
//				throw ex;
//			}
		}

		//**************************************************************************              
		///    <Description>
		///       After the column is deleted, a edit flag is raised to know that 
		///       This data is edit and must be saved before closing
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_AfterDelete(object sender, System.EventArgs e)
		{
			//re calculate the total delivery quantity
			const string METHOD_NAME = THIS + ".dgrdData_AfterDelete()";
			try 
			{
				lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();
				dgrdData.Update();
				ChangeLineNumber();
				enumAction = EnumAction.Edit;
			}			
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}

		}

		//**************************************************************************              
		///    <Description>
		///       After update, a edit flag is raised to know that 
		///       This data is edit and must be saved before closing
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_AfterUpdate(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_AfterUpdate()";
			try 
			{
				lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();
				enumAction = EnumAction.Edit;
			}			
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				// log message.
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		//**************************************************************************              
		///    <Description>
		///       This method is used to add a new row into grid when user press F12 button
		///    </Description>
		///    <Inputs>
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void SODeliverySchedule_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".SODeliverySchedule_KeyDown()";
			if (e.KeyCode == Keys.F4 && btnSave.Enabled)
			{
				
			}
			if (e.KeyCode == Keys.F12)
			{
				try
				{
					//add a new row
					dgrdData.UpdateData();
					if (dgrdData.AllowAddNew)
					{
						if (lblTotalDelivery.Text.Trim() == lblOrderQuantity.Text.Trim()
							|| (decimal.Parse(lblOrderQuantity.Text) - decimal.Parse(lblTotalDelivery.Text) <=0))
						{
							//MessageBox.Show("There are enought order quantity, you cannot add more row");
							PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
							return;
						}
						CurrencyManager cm;

						//dgrdData.Refresh();
						dgrdData.MoveLast();
						//dgrdData.Row = dgrdData.Row + 1;

						cm = (CurrencyManager) dgrdData.BindingContext[dgrdData.DataSource];
						cm.EndCurrentEdit();
						cm.AddNew();
						AssignDefaultValue();
					
						//focus on the first cell
						dgrdData.Col = 2;
					}
				}
				catch (NoNullAllowedException ex) 
				{
					PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
					// log message.
					try
					{
						Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
					}
					catch
					{
						PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
					}
				}
				catch (ConstraintException ex) 
				{
					PCSMessageBox.Show(ErrorCode.DUPLICATE_KEY, MessageBoxIcon.Error);
					// log message.
					try
					{
						Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
					}
					catch
					{
						PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
					}
				}

				catch (Exception ex)
				{
					PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
					// log message.
					try
					{
						Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
					}
					catch
					{
						PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
					}
				}

			}
		
		}

		//**************************************************************************              
		///    <Description>
		///       Before inserting a new row, this method will check if there is still quantity that need to be shipped
		///    </Description>
		///    <Inputs>
		///        
		///    </Inputs>
		///    <Outputs>
		///       
		///    </Outputs>
		///    <Returns>
		///       
		///    </Returns>
		///    <Authors>
		///       HungLa
		///    </Authors>
		///    <History>
		///       Tuesday, February 01, 2005
		///    </History>
		///    <Notes>
		///    </Notes>
		//**************************************************************************

		private void dgrdData_BeforeInsert(object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dgrdData_BeforeInsert()";
			try
			{
				blnAddNewByF12 = false;
				if (lblTotalDelivery.Text.Trim() == lblOrderQuantity.Text.Trim()
					|| (decimal.Parse(lblOrderQuantity.Text) - decimal.Parse(lblTotalDelivery.Text) <=0))
				{
					//MessageBox.Show("There are enought order quantity, you cannot add more row");
					PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
					dtmDate.TextDetached = true;
					e.Cancel = true;
					return;
				}
				if (lblOrderQuantity.Text.Trim() == lblTotalDelivery.Text.Trim()) 
				{
					//MessageBox.Show("There are no enough quantiy for new order delivery ");
					PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
					dtmDate.TextDetached = true;
					e.Cancel = true;
				}
			}
			catch (PCSException ex)
			{
				// Displays the error message if throwed from PCSException.
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				// Displays the error message if throwed from system.
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					// Log error message into log file.
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					// Show message if logger has an error.
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void dtmDate_DropDownClosed(object sender, System.EventArgs e)
		{
			const string METHOD_NAME = THIS + ".dtmTransDate_DropDownClosed()";
			try
			{
				if (dtmDate.Text != string.Empty)
				{
					DateTime dtmValue = new DateTime(DateTime.Parse(dtmDate.Value.ToString()).Year, DateTime.Parse(dtmDate.Value.ToString()).Month, DateTime.Parse(dtmDate.Value.ToString()).Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
					dtmDate.Value = dtmValue;
				}
				else
				{
					dgrdData[dgrdData.Row, dgrdData.Col] = DBNull.Value;
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private void dtmDate_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + ".dtmDate_KeyDown()";
			try
			{
				if (e.KeyCode == Keys.Enter)
				{
					dgrdData.Col = dgrdData.Col + 1;
					dgrdData.Focus();
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}

		private int GetRowsCount()
		{
		    return dgrdData.RowCount;
		}

		private void dgrdData_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			const string METHOD_NAME = THIS + "().dgrdData_KeyDown";
			try
			{
				if (e.KeyCode == Keys.F4 && btnSave.Enabled)
				{
					dgrdData_ButtonClick(null, null);
				}

				if (e.KeyCode == Keys.Delete)
				{
                    int iDelyvery = 0;
                    try
                    {
                        iDelyvery = Convert.ToInt32(dgrdData[dgrdData.Row, SO_DeliveryScheduleTable.DELIVERYSCHEDULEID_FLD]);
                    }
                    catch
                    { }
                    SODeliveryScheduleBO objBO = new SODeliveryScheduleBO();
                    objBO.DeleteRow(iDelyvery);
					if (CheckBeforeDeleteAllRows())
					{
						FormControlComponents.DeleteMultiRowsOnTrueDBGrid(dgrdData);
						for (int i =0; i <GetRowsCount(); i++)
							dgrdData[i, SO_DeliveryScheduleTable.LINE_FLD] = i+1;
						lblTotalDelivery.Value = SumTotalDeliveryQuantity().ToString();
						return;
					}
					else
					{
						PCSMessageBox.Show(ErrorCode.MESSAGE_SOLINE_HAS_DELIVERY, MessageBoxIcon.Warning);
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
		/// <summary>
		/// FillItemDataToGrid
		/// </summary>
		/// <param name="pdrowData"></param>
		/// <author>Trada</author>
		/// <date>Monday, May 29 2006</date>
		private void FillItemDataToGrid(DataRow pdrowData)
		{
			const string METHOD_NAME = THIS + ".FillItemDataToGrid()";
			try
			{
				dgrdData.EditActive = true;
//				dgrdData.Columns[SO_GateTable.GATEID_FLD].Value = int.Parse(pdrowData[SO_GateTable.GATEID_FLD].ToString());
//				dgrdData.Columns[SO_GateTable.CODE_FLD].Value = pdrowData[SO_GateTable.CODE_FLD];
				dgrdData[dgrdData.Row, SO_GateTable.GATEID_FLD] = int.Parse(pdrowData[SO_GateTable.GATEID_FLD].ToString());
				dgrdData[dgrdData.Row, SO_GateTable.CODE_FLD] = pdrowData[SO_GateTable.CODE_FLD];
			}
			catch (PCSException ex)
			{
				throw new PCSException(ex.mCode, METHOD_NAME, ex);
			}
			catch (Exception ex)
			{
				throw new Exception(ex.Message, ex);
			}
		}
		/// <summary>
		/// dgrdData_ButtonClick
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		/// <author>Trada</author>
		/// <date>Monday, May 29 2006</date>
		private void dgrdData_ButtonClick(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
		{
			const string METHOD_NAME = THIS + "().dgrdData_ButtonClick";
			try
			{
				//if (dgrdData.Row == dgrdData.RowCount - 1)
				if (dgrdData.Row == dsDeliverySchedule.Tables[0].Rows.Count 
					&& dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[SO_GateTable.CODE_FLD]))
				{
					if (lblTotalDelivery.Text.Trim() == lblOrderQuantity.Text.Trim()
						|| (decimal.Parse(lblOrderQuantity.Text) - decimal.Parse(lblTotalDelivery.Text) <=0))
					{
						//MessageBox.Show("There are enought order quantity, you cannot add more row");
						PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
						dtmDate.TextDetached = true;
						return;
					}
					if (lblOrderQuantity.Text.Trim() == lblTotalDelivery.Text.Trim()) 
					{
						//MessageBox.Show("There are no enough quantiy for new order delivery ");
						PCSMessageBox.Show(ErrorCode.MESSAGE_ENOUGH_DELIVERYQTY,MessageBoxIcon.Warning);
						dtmDate.TextDetached = true;
					}
				}
				DataRowView drwResult = null;
				Hashtable htbCondition= new Hashtable();
				
				if (!btnSave.Enabled) return;
				//Select Gate
				if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[SO_GateTable.CODE_FLD]))
				{
					if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
					{
						drwResult = FormControlComponents.OpenSearchForm(SO_GateTable.TABLE_NAME, SO_GateTable.CODE_FLD, dgrdData[dgrdData.Row, SO_GateTable.CODE_FLD].ToString(), htbCondition, true);
					}
					else
					{
						drwResult = FormControlComponents.OpenSearchForm(SO_GateTable.TABLE_NAME, SO_GateTable.CODE_FLD, dgrdData.Columns[SO_GateTable.CODE_FLD].Text.Trim(), htbCondition, true);
					}
					if (drwResult != null)
					{
						dgrdData.EditActive = true;
						FillItemDataToGrid(drwResult.Row);
					}
				}
			}
			catch (PCSException ex)
			{
				PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
			catch (Exception ex)
			{
				PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
				try
				{
					Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
				}
				catch
				{
					PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
				}
			}
		}
	}
}
